KEYTYPE - Key typeVALUETYPE - Value type@ThreadSafe public class MapBasedGenericAttributeContainerThreadSafe<KEYTYPE,VALUETYPE> extends MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>
MapBasedGenericAttributeContainer!| Modifier and Type | Field and Description |
|---|---|
protected ReadWriteLock |
m_aRWLock |
| Constructor and Description |
|---|
MapBasedGenericAttributeContainerThreadSafe() |
MapBasedGenericAttributeContainerThreadSafe(IGenericReadonlyAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aCont) |
MapBasedGenericAttributeContainerThreadSafe(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
| Modifier and Type | Method and Description |
|---|---|
EChange |
clear()
Reset the contents of the element to the after-construction state.
|
boolean |
containsAttribute(KEYTYPE aName)
Check if an attribute of the given name is contained.
|
boolean |
containsNoAttribute() |
boolean |
equals(Object o) |
Set<KEYTYPE> |
getAllAttributeNames() |
Map<KEYTYPE,VALUETYPE> |
getAllAttributes() |
Collection<VALUETYPE> |
getAllAttributeValues() |
int |
getAttributeCount() |
Enumeration<KEYTYPE> |
getAttributeNames()
Get an enumerator over all contained attribute names.
|
VALUETYPE |
getAttributeObject(KEYTYPE aName)
Get the attribute value associated to the given attribute name.
|
MapBasedGenericAttributeContainerThreadSafe<KEYTYPE,VALUETYPE> |
getClone() |
int |
hashCode() |
EChange |
removeAttribute(KEYTYPE aName)
Remove the specified attribute from the container.
|
EChange |
setAttribute(KEYTYPE aName,
VALUETYPE aValue)
Set/overwrite an attribute value.
|
onBeforeRemoveAttribute, onBeforeSetAttributeValue, setAttributes, setAttributes, toStringgetAsBigDecimal, getAsBigInteger, getAsBoolean, getAsDouble, getAsInt, getAsLong, getAsString, getAttributeAsBigDecimal, getAttributeAsBigDecimal, getAttributeAsBigInteger, getAttributeAsBigInteger, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttributeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetAttributeAsBigDecimal, getAttributeAsBigDecimal, getAttributeAsBigInteger, getAttributeAsBigInteger, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttributeprotected final ReadWriteLock m_aRWLock
public MapBasedGenericAttributeContainerThreadSafe()
public MapBasedGenericAttributeContainerThreadSafe(@Nonnull Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
public MapBasedGenericAttributeContainerThreadSafe(@Nonnull IGenericReadonlyAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aCont)
public boolean containsAttribute(@Nullable KEYTYPE aName)
IGenericReadonlyAttributeContainercontainsAttribute in interface IGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE>containsAttribute in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>aName - name of the attribute to checktrue if the attribute is contained, false
otherwise@Nonnull @ReturnsMutableCopy public Map<KEYTYPE,VALUETYPE> getAllAttributes()
getAllAttributes in interface IGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE>getAllAttributes in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>null map with all contained attributes.@Nullable public VALUETYPE getAttributeObject(@Nullable KEYTYPE aName)
IGenericReadonlyAttributeContainergetAttributeObject in interface IGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE>getAttributeObject in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>aName - the attribute namenull if no such value exists@Nonnull public EChange setAttribute(@Nonnull KEYTYPE aName, @Nullable VALUETYPE aValue)
IGenericAttributeContainersetAttribute in interface IGenericAttributeContainer<KEYTYPE,VALUETYPE>setAttribute in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>aName - The name of the attribute. May not be null.aValue - The value of the attribute. If it is null, the value
will be removed.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.IGenericAttributeContainer.removeAttribute(Object)@Nonnull public EChange removeAttribute(@Nullable KEYTYPE aName)
IGenericAttributeContainerremoveAttribute in interface IGenericAttributeContainer<KEYTYPE,VALUETYPE>removeAttribute in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>aName - The attribute name to be removed. If it is null nothing
happens.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.@Nonnull @ReturnsMutableCopy public Enumeration<KEYTYPE> getAttributeNames()
IGenericReadonlyAttributeContainergetAttributeNames in interface IGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE>getAttributeNames in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>@Nonnull @ReturnsMutableCopy public Set<KEYTYPE> getAllAttributeNames()
getAllAttributeNames in interface IGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE>getAllAttributeNames in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>@Nonnull @ReturnsMutableCopy public Collection<VALUETYPE> getAllAttributeValues()
getAllAttributeValues in interface IGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE>getAllAttributeValues in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>@Nonnegative public int getAttributeCount()
getAttributeCount in interface IGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE>getAttributeCount in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>public boolean containsNoAttribute()
containsNoAttribute in interface IGenericReadonlyAttributeContainer<KEYTYPE,VALUETYPE>containsNoAttribute in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>true if this attribute container does not contain any
attribute at all, false if at least one attribute is
contained.@Nonnull public EChange clear()
IClearableclear in interface IClearableclear in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>EChange.CHANGED if at least one element was cleared,
EChange.UNCHANGED otherwise.@Nonnull public MapBasedGenericAttributeContainerThreadSafe<KEYTYPE,VALUETYPE> getClone()
getClone in interface ICloneable<MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>>getClone in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>public boolean equals(Object o)
equals in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>public int hashCode()
hashCode in class MapBasedGenericAttributeContainer<KEYTYPE,VALUETYPE>Copyright © 2014 Philip Helger. All rights reserved.