
org.tango.client.database.cache.AttributeCache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JTangoCommons Show documentation
Show all versions of JTangoCommons Show documentation
Common classes for tango java API
The newest version!
package org.tango.client.database.cache;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.tango.utils.CaseInsensitiveMap;
import java.util.Map;
public final class AttributeCache {
private final String name;
private final Map propertiesCache = new CaseInsensitiveMap();
AttributeCache(final String name) {
this.name = name;
}
public String getName() {
return name;
}
public void addProperty(final String propertyName, final String[] propertyValue) {
propertiesCache.put(propertyName, propertyValue);
}
public Map getPropertiesCache() {
return new CaseInsensitiveMap(propertiesCache);
}
public void addProperties(final Map properties) {
propertiesCache.putAll(properties);
}
public void removeAll() {
propertiesCache.clear();
}
/**
* @return a string
*/
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy