All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.payneteasy.superfly.common.store.SimpleStringStore Maven / Gradle / Ivy

There is a newer version: 1.7-32
Show newest version
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