xapi.collect.impl.StringDictionaryDefault Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xapi-core-collect Show documentation
Show all versions of xapi-core-collect Show documentation
Core interfaces for our collections api.
package xapi.collect.impl;
import xapi.collect.api.StringDictionary;
import xapi.util.api.ReceivesValue;
public class StringDictionaryDefault extends StringToAbstract implements StringDictionary{
@Override
public boolean hasValue(String key) {
return containsKey(key);
}
@Override
public V getValue(String key) {
return get(key);
}
@Override
public V setValue(String key, V value) {
return put(key, value);
}
@Override
public V removeValue(String key) {
return remove(key);
}
@Override
public void clearValues() {
clear();
}
@Override
public void forKeys(ReceivesValue receiver) {
for (String key : keyArray()) {
receiver.set(key);
}
}
}