KEYTYPE - Key typeVALUETYPE - Value typepublic interface IMutableAttributeContainer<KEYTYPE,VALUETYPE> extends IAttributeContainer<KEYTYPE,VALUETYPE>, IClearable
IAttributeContainer.
null values are not allowed in this attribute containers.| Modifier and Type | Method and Description |
|---|---|
default VALUETYPE |
computeIfAbsent(KEYTYPE aName,
Function<? super KEYTYPE,? extends VALUETYPE> aValueProvider)
Compute an attribute value if it is not present.
|
EChange |
removeAttribute(KEYTYPE aName)
Remove the specified attribute from the container.
|
EChange |
setAttribute(KEYTYPE aName,
VALUETYPE aValue)
Set/overwrite an attribute value.
|
EChange |
setAttributes(IAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aValues)
Set/overwrite an arbitrary number of attribute values.
|
EChange |
setAttributes(Map<? extends KEYTYPE,? extends VALUETYPE> aValues)
Set/overwrite an arbitrary number of attribute values.
|
containsAttribute, forAllAttributes, forAllAttributeValues, getAllAttributeNames, getAllAttributes, getAllAttributeValues, getAttributeAsBigDecimal, getAttributeAsBigDecimal, getAttributeAsBigInteger, getAttributeAsBigInteger, getAttributeAsBoolean, getAttributeAsBoolean, getAttributeAsDouble, getAttributeAsDouble, getAttributeAsInt, getAttributeAsInt, getAttributeAsLong, getAttributeAsLong, getAttributeAsString, getAttributeAsString, getAttributeCount, getAttributeObject, getCastedAttribute, getCastedAttribute, getTypedAttribute, getTypedAttribute, isEmpty, isNotEmpty, iteratorcontainsAny, containsNone, containsOnly, findAll, findAllInstanceOf, findAllMapped, findAllMapped, findAllMapped, findFirst, findFirst, findFirstMapped, findFirstMapped, forEach, forEach, forEachBreakable, getIteratorCount, getIteratorCountforEach, spliteratorclear@Nonnull EChange setAttribute(@Nonnull KEYTYPE aName, @Nullable VALUETYPE aValue)
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.removeAttribute(Object)@Nonnull EChange setAttributes(@Nullable Map<? extends KEYTYPE,? extends VALUETYPE> aValues)
aValues - The map of attributes to be set. May be null.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.setAttribute(Object,Object)@Nonnull EChange setAttributes(@Nullable IAttributeContainer<? extends KEYTYPE,? extends VALUETYPE> aValues)
aValues - The attributes to be set. May be null.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.setAttribute(Object,Object)@Nonnull EChange removeAttribute(@Nullable KEYTYPE aName)
aName - The attribute name to be removed. If it is null nothing
happens.EChange.CHANGED if something changed,
EChange.UNCHANGED otherwise.@Nullable default VALUETYPE computeIfAbsent(@Nonnull KEYTYPE aName, @Nonnull Function<? super KEYTYPE,? extends VALUETYPE> aValueProvider)
aName - The name of the attribute. May not be null.aValueProvider - The value provider of the attribute. May not be null.
Is only invoked, if the attribute is not present.Copyright © 2014–2017 Philip Helger. All rights reserved.