public interface MutableAttributeMap extends AttributeMap
Implementations can optionally support listeners
that will be notified when
they're bound in or unbound from the map.
Modifier and Type | Method and Description |
---|---|
MutableAttributeMap |
clear()
Remove all attributes in this map.
|
Object |
extract(String attributeName)
Extract an attribute from this map, getting it and removing it in a single operation.
|
Object |
put(String attributeName,
Object attributeValue)
Put the attribute into this map.
|
MutableAttributeMap |
putAll(AttributeMap attributes)
Put all the attributes into this map.
|
Object |
remove(String attributeName)
Remove an attribute from this map.
|
MutableAttributeMap |
removeAll(MutableAttributeMap attributes)
Remove all attributes in the map provided from this map.
|
MutableAttributeMap |
replaceWith(AttributeMap attributes)
Replace the contents of this attribute map with the contents of the provided collection.
|
contains, contains, get, get, get, get, getArray, getBoolean, getBoolean, getCollection, getCollection, getInteger, getInteger, getLong, getLong, getNumber, getNumber, getRequired, getRequired, getRequiredArray, getRequiredBoolean, getRequiredCollection, getRequiredCollection, getRequiredInteger, getRequiredLong, getRequiredNumber, getRequiredString, getString, getString, isEmpty, size, union
asMap
Object put(String attributeName, Object attributeValue)
If the attribute value is an AttributeMapBindingListener
this map will publish
binding events
such as on "bind" and "unbind" if supported.
Note: not all MutableAttributeMap
implementations support this.
attributeName
- the attribute nameattributeValue
- the attribute valuenull
of there was no previous valueMutableAttributeMap putAll(AttributeMap attributes)
attributes
- the attributes to put into this mapMutableAttributeMap removeAll(MutableAttributeMap attributes)
attributes
- the attributes to remove from this mapObject remove(String attributeName)
attributeName
- the name of the attribute to removeObject extract(String attributeName)
attributeName
- the attribute namenull
of there was no valueMutableAttributeMap clear()
MutableAttributeMap replaceWith(AttributeMap attributes) throws UnsupportedOperationException
attributes
- the attribute collectionUnsupportedOperationException