@NotThreadSafe public class MapBasedAttributeContainer extends MapBasedGenericAttributeContainer<String,Object> implements IAttributeContainer
| Constructor and Description |
|---|
MapBasedAttributeContainer() |
MapBasedAttributeContainer(IGenericReadonlyAttributeContainer<? extends String,? extends Object> aCont) |
MapBasedAttributeContainer(Map<? extends String,? extends Object> aMap) |
MapBasedAttributeContainer(String sKey,
Object aValue) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAndSetAttributeFlag(String sName)
Atomic operation to set a flag to
true if it was previously
set to false (meaning not existing). |
MapBasedAttributeContainer |
getClone() |
EChange |
setAttribute(String sName,
boolean dValue)
Set/overwrite an in attribute value.
|
EChange |
setAttribute(String sName,
double dValue)
Set/overwrite an in attribute value.
|
EChange |
setAttribute(String sName,
int nValue)
Set/overwrite an in attribute value.
|
EChange |
setAttribute(String sName,
long nValue)
Set/overwrite an in attribute value.
|
clear, containsAttribute, containsNoAttribute, equals, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAttributeCount, getAttributeNames, getAttributeObject, hashCode, onBeforeRemoveAttribute, onBeforeSetAttributeValue, removeAttribute, setAttribute, 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, waitremoveAttribute, setAttribute, setAttributes, setAttributescontainsAttribute, containsNoAttribute, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAttributeAsBigDecimal, getAttributeAsBigDecimal, getAttributeAsBigInteger, getAttributeAsBigInteger, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getAttributeCount, getAttributeNames, getAttributeObject, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttributeclearpublic MapBasedAttributeContainer()
public MapBasedAttributeContainer(@Nonnull String sKey, @Nullable Object aValue)
public MapBasedAttributeContainer(@Nonnull Map<? extends String,? extends Object> aMap)
public MapBasedAttributeContainer(@Nonnull IGenericReadonlyAttributeContainer<? extends String,? extends Object> aCont)
@Nonnull public final EChange setAttribute(@Nonnull String sName, boolean dValue)
IAttributeContainersetAttribute (aName, Boolean.valueOf (bValue));setAttribute in interface IAttributeContainersName - The name of the attribute. May not be null.dValue - The value of the attribute.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.#removeAttribute(String)@Nonnull public final EChange setAttribute(@Nonnull String sName, int nValue)
IAttributeContainersetAttribute (aName, Integer.valueOf (nValue));setAttribute in interface IAttributeContainersName - The name of the attribute. May not be null.nValue - The value of the attribute.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.#removeAttribute(String)@Nonnull public final EChange setAttribute(@Nonnull String sName, long nValue)
IAttributeContainersetAttribute (aName, Long.valueOf (nValue));setAttribute in interface IAttributeContainersName - The name of the attribute. May not be null.nValue - The value of the attribute.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.#removeAttribute(String)@Nonnull public final EChange setAttribute(@Nonnull String sName, double dValue)
IAttributeContainersetAttribute (aName, Double.valueOf (nValue));setAttribute in interface IAttributeContainersName - The name of the attribute. May not be null.dValue - The value of the attribute.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.#removeAttribute(String)public boolean getAndSetAttributeFlag(@Nonnull String sName)
IAttributeContainertrue if it was previously
set to false (meaning not existing). There is no possibility
to define a value for this flag. The value used is Boolean.TRUE.
#containsAttribute(String) can be used to check if the attribute is
already present.getAndSetAttributeFlag in interface IAttributeContainersName - The name of the flag to set.false is returned, whereas if the flag was
already present, true is returned. Any other than the
first call for the same flag is always returning true.public MapBasedAttributeContainer getClone()
getClone in interface ICloneable<MapBasedGenericAttributeContainer<String,Object>>getClone in class MapBasedGenericAttributeContainer<String,Object>Copyright © 2014–2015 Philip Helger. All rights reserved.