public interface IAttributeContainer extends IReadonlyAttributeContainer, IClearable
IReadonlyAttributeContainer.
null values are not allowed in this attribute containers.| 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). |
EChange |
removeAttribute(String sName)
Remove the specified attribute from the container.
|
EChange |
setAttribute(String sName,
boolean bValue)
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.
|
EChange |
setAttribute(String sName,
Object aValue)
Set/overwrite an attribute value.
|
EChange |
setAttributes(IReadonlyAttributeContainer aValues)
Set/overwrite an arbitrary number of attribute values.
|
EChange |
setAttributes(Map<String,?> aValues)
Set/overwrite an arbitrary number of attribute values.
|
containsAttribute, containsNoAttribute, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getAttributeCount, getAttributeNames, getAttributeObject, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttributeclear@Nonnull EChange setAttribute(@Nonnull String sName, @Nullable Object aValue)
sName - 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.removeAttribute(String)@Nonnull EChange setAttribute(@Nonnull String sName, boolean bValue)
setAttribute (sName, Boolean.valueOf (bValue));sName - The name of the attribute. May not be null.bValue - The value of the attribute.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.removeAttribute(String)@Nonnull EChange setAttribute(@Nonnull String sName, int nValue)
setAttribute (sName, Integer.valueOf (nValue));sName - 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 EChange setAttribute(@Nonnull String sName, long nValue)
setAttribute (sName, Long.valueOf (nValue));sName - 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 EChange setAttribute(@Nonnull String sName, double dValue)
setAttribute (sName, Double.valueOf (nValue));sName - 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 EChange setAttributes(@Nullable Map<String,?> aValues)
aValues - The map of attributes to be set. May be null.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.setAttribute(String,Object)@Nonnull EChange setAttributes(@Nullable IReadonlyAttributeContainer aValues)
aValues - The attributes to be set. May be null.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.setAttribute(String,Object)@Nonnull EChange removeAttribute(@Nullable String sName)
sName - The attribute name to be removed. If it is null nothing
happens.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.boolean getAndSetAttributeFlag(@Nonnull String sName)
true 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.
IReadonlyAttributeContainer.containsAttribute(String) can be used to check if the attribute is
already present.sName - 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.Copyright © 2006–2014 phloc systems. All rights reserved.