public interface MutableAttributeMap<V> extends AttributeMap<V>
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<V> |
clear()
Remove all attributes in this map.
|
java.lang.Object |
extract(java.lang.String attributeName)
Extract an attribute from this map, getting it and removing it in a single operation.
|
V |
put(java.lang.String attributeName,
V attributeValue)
Put the attribute into this map.
|
MutableAttributeMap<V> |
putAll(AttributeMap<? extends V> attributes)
Put all the attributes into this map.
|
java.lang.Object |
remove(java.lang.String attributeName)
Remove an attribute from this map.
|
MutableAttributeMap<V> |
removeAll(MutableAttributeMap<? extends V> attributes)
Remove all attributes in the map provided from this map.
|
MutableAttributeMap<V> |
replaceWith(AttributeMap<? extends V> 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
V put(java.lang.String attributeName, V 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<V> putAll(AttributeMap<? extends V> attributes)
attributes
- the attributes to put into this mapMutableAttributeMap<V> removeAll(MutableAttributeMap<? extends V> attributes)
attributes
- the attributes to remove from this mapjava.lang.Object remove(java.lang.String attributeName)
attributeName
- the name of the attribute to removejava.lang.Object extract(java.lang.String attributeName)
attributeName
- the attribute namenull
of there was no valueMutableAttributeMap<V> clear()
MutableAttributeMap<V> replaceWith(AttributeMap<? extends V> attributes) throws java.lang.UnsupportedOperationException
attributes
- the attribute collectionjava.lang.UnsupportedOperationException