KEYTYPE - Key typeVALUETYPE - Value type@NotThreadSafe public class MapBasedAttributeContainer<KEYTYPE,VALUETYPE> extends MapBasedReadOnlyAttributeContainer<KEYTYPE,VALUETYPE> implements ICloneable<MapBasedAttributeContainer<KEYTYPE,VALUETYPE>>
m_aAttrs| Modifier | Constructor and Description |
|---|---|
|
MapBasedAttributeContainer() |
protected |
MapBasedAttributeContainer(boolean bDummy,
Map<KEYTYPE,VALUETYPE> aAttrMap) |
|
MapBasedAttributeContainer(IAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aCont) |
|
MapBasedAttributeContainer(KEYTYPE aKey,
VALUETYPE aValue) |
|
MapBasedAttributeContainer(Map<? extends KEYTYPE,? extends VALUETYPE> aMap) |
| Modifier and Type | Method and Description |
|---|---|
EChange |
clear() |
boolean |
equals(Object o) |
MapBasedAttributeContainer<KEYTYPE,VALUETYPE> |
getClone() |
int |
hashCode() |
protected EContinue |
onBeforeRemoveAllAttributes()
Internal callback method that can be used to avoid removal of all
attributes.
|
protected EContinue |
onBeforeRemoveAttribute(KEYTYPE aName)
Internal callback method that can be used to avoid removal of an attribute.
|
protected EContinue |
onBeforeSetAttributeValue(KEYTYPE aName,
VALUETYPE aValue)
Internal callback method that can be used to check constraints on an
attribute name or value.
|
EChange |
removeAttribute(KEYTYPE aName) |
EChange |
setAttribute(KEYTYPE aName,
VALUETYPE aValue) |
EChange |
setAttributes(IAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aValues) |
EChange |
setAttributes(Map<? extends KEYTYPE,? extends VALUETYPE> aValues) |
String |
toString() |
containsAttribute, containsNoAttribute, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAttributeCount, getAttributeObjectgetAsBigDecimal, getAsBigInteger, getAsBoolean, getAsDouble, getAsInt, getAsLong, getAsString, getAttributeAsBigDecimal, getAttributeAsBigDecimal, getAttributeAsBigInteger, getAttributeAsBigInteger, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttributepublic MapBasedAttributeContainer()
public MapBasedAttributeContainer(@Nonnull KEYTYPE aKey, @Nullable VALUETYPE aValue)
public MapBasedAttributeContainer(@Nonnull Map<? extends KEYTYPE,? extends VALUETYPE> aMap)
public MapBasedAttributeContainer(@Nonnull IAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aCont)
@Nonnull public final EChange setAttributes(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aValues)
@Nonnull public final EChange setAttributes(@Nullable IAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aValues)
@OverrideOnDemand @Nonnull protected EContinue onBeforeSetAttributeValue(@Nonnull KEYTYPE aName, @Nonnull VALUETYPE aValue)
aName - The attribute name. Never null.aValue - The attribute value. Never null.EContinue.CONTINUE to indicate that the name-value-pair is
OK. May not be null.@Nonnull public EChange setAttribute(@Nonnull KEYTYPE aName, @Nullable VALUETYPE aValue)
@OverrideOnDemand @Nonnull protected EContinue onBeforeRemoveAttribute(@Nonnull KEYTYPE aName)
aName - The attribute name. Never null.EContinue.CONTINUE to indicate that the operation should
continue. May not be null.@OverrideOnDemand @Nonnull protected EContinue onBeforeRemoveAllAttributes()
EContinue.CONTINUE to indicate that the operation should
continue. May not be null.@Nonnull @ReturnsMutableCopy public MapBasedAttributeContainer<KEYTYPE,VALUETYPE> getClone()
getClone in interface ICloneable<MapBasedAttributeContainer<KEYTYPE,VALUETYPE>>public boolean equals(Object o)
equals in class MapBasedReadOnlyAttributeContainer<KEYTYPE,VALUETYPE>public int hashCode()
hashCode in class MapBasedReadOnlyAttributeContainer<KEYTYPE,VALUETYPE>public String toString()
toString in class MapBasedReadOnlyAttributeContainer<KEYTYPE,VALUETYPE>Copyright © 2014–2015 Philip Helger. All rights reserved.