com.payneteasy.superfly.common.store.SimpleStringStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of superfly-common Show documentation
Show all versions of superfly-common Show documentation
Common classes used by other Superfly libraries
package com.payneteasy.superfly.common.store;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
/**
* Simple {@link StringStore} implementation which users an in-memory set.
*
* @author Roman Puchkovskiy
*/
public class SimpleStringStore implements StringStore {
private Set strings;
public boolean exists(String key) {
return strings.contains(key);
}
public void setObjects(List objects) {
strings = Collections.unmodifiableSet(new HashSet(objects));
}
public Collection getObjects() {
return strings;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy