KEYTYPE - Key type@NotThreadSafe public class MapBasedAttributeContainerAny<KEYTYPE> extends MapBasedAttributeContainer<KEYTYPE,Object> implements IMutableAttributeContainerAny<KEYTYPE>
m_aAttrs| Modifier | Constructor and Description |
|---|---|
|
MapBasedAttributeContainerAny() |
protected |
MapBasedAttributeContainerAny(boolean bDummy,
Map<KEYTYPE,Object> aAttrMap) |
|
MapBasedAttributeContainerAny(IAttributeContainer<? extends KEYTYPE,? extends Object> aCont) |
|
MapBasedAttributeContainerAny(KEYTYPE sKey,
Object aValue) |
|
MapBasedAttributeContainerAny(Map<? extends KEYTYPE,? extends Object> aMap) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAndSetAttributeFlag(KEYTYPE aName)
Atomic operation to set a flag to
true if it was previously
set to false (meaning not existing). |
MapBasedAttributeContainerAny<KEYTYPE> |
getClone() |
EChange |
setAttribute(KEYTYPE aName,
boolean dValue)
Set/overwrite an in attribute value.
|
EChange |
setAttribute(KEYTYPE aName,
double dValue)
Set/overwrite an in attribute value.
|
EChange |
setAttribute(KEYTYPE aName,
int nValue)
Set/overwrite an in attribute value.
|
EChange |
setAttribute(KEYTYPE aName,
long nValue)
Set/overwrite an in attribute value.
|
clear, equals, hashCode, onBeforeRemoveAllAttributes, onBeforeRemoveAttribute, onBeforeSetAttributeValue, removeAttribute, setAttribute, setAttributes, setAttributes, toStringcontainsAttribute, containsNoAttribute, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAttributeCount, getAttributeObject, getIteratorgetAsBigDecimal, 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, getAttributeObject, getCastedAttribute, getCastedAttribute, getIterator, getTypedAttribute, getTypedAttributeclearpublic MapBasedAttributeContainerAny()
public MapBasedAttributeContainerAny(@Nonnull KEYTYPE sKey, @Nullable Object aValue)
public MapBasedAttributeContainerAny(@Nonnull Map<? extends KEYTYPE,? extends Object> aMap)
public MapBasedAttributeContainerAny(@Nonnull IAttributeContainer<? extends KEYTYPE,? extends Object> aCont)
@Nonnull public final EChange setAttribute(@Nonnull KEYTYPE aName, boolean dValue)
IMutableAttributeContainerAnysetAttribute (aName, Boolean.valueOf (bValue));setAttribute in interface IMutableAttributeContainerAny<KEYTYPE>aName - The name of the attribute. May not be null.dValue - The value of the attribute.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.IMutableAttributeContainer.removeAttribute(Object)@Nonnull public final EChange setAttribute(@Nonnull KEYTYPE aName, int nValue)
IMutableAttributeContainerAnysetAttribute (aName, Integer.valueOf (nValue));setAttribute in interface IMutableAttributeContainerAny<KEYTYPE>aName - The name of the attribute. May not be null.nValue - The value of the attribute.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.IMutableAttributeContainer.removeAttribute(Object)@Nonnull public final EChange setAttribute(@Nonnull KEYTYPE aName, long nValue)
IMutableAttributeContainerAnysetAttribute (aName, Long.valueOf (nValue));setAttribute in interface IMutableAttributeContainerAny<KEYTYPE>aName - The name of the attribute. May not be null.nValue - The value of the attribute.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.IMutableAttributeContainer.removeAttribute(Object)@Nonnull public final EChange setAttribute(@Nonnull KEYTYPE aName, double dValue)
IMutableAttributeContainerAnysetAttribute (aName, Double.valueOf (nValue));setAttribute in interface IMutableAttributeContainerAny<KEYTYPE>aName - The name of the attribute. May not be null.dValue - The value of the attribute.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.IMutableAttributeContainer.removeAttribute(Object)public boolean getAndSetAttributeFlag(@Nonnull KEYTYPE aName)
IMutableAttributeContainerAnytrue 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.
IAttributeContainer.containsAttribute(Object) can be used to
check if the attribute is already present.getAndSetAttributeFlag in interface IMutableAttributeContainerAny<KEYTYPE>aName - 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.@Nonnull @ReturnsMutableCopy public MapBasedAttributeContainerAny<KEYTYPE> getClone()
getClone in interface ICloneable<MapBasedAttributeContainer<KEYTYPE,Object>>getClone in class MapBasedAttributeContainer<KEYTYPE,Object>Copyright © 2014–2016 Philip Helger. All rights reserved.