date.iterator.count.util.GlobalKeyCenter Maven / Gradle / Ivy
package date.iterator.count.util;
import java.util.ArrayList;
import java.util.List;
public enum GlobalKeyCenter {
INSTANCE;
private List keys;
GlobalKeyCenter() {
keys = new ArrayList<>();
}
public void addKey(final String key) {
if (keys.contains(key)){
return;
}
keys.add(key);
}
public void deleteKey(final String key) {
keys.remove(key);
}
public int keysCount() {
return keys.size();
}
public List getKeys() {
return keys;
}
public void setKeys(List keys) {
this.keys = keys;
}
}