Spring Web Flow

org.springframework.webflow.core.collection
Interface MutableAttributeMap<V>

All Superinterfaces:
AttributeMap<V>, MapAdaptable<java.lang.String,V>
All Known Subinterfaces:
SharedAttributeMap<V>
All Known Implementing Classes:
LocalAttributeMap, LocalSharedAttributeMap

public interface MutableAttributeMap<V>
extends AttributeMap<V>

An interface for accessing and modifying attributes in a backing map with string keys.

Implementations can optionally support listeners that will be notified when they're bound in or unbound from the map.

Author:
Keith Donald

Method Summary
 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.
 
Methods inherited from interface org.springframework.webflow.core.collection.AttributeMap
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
 
Methods inherited from interface org.springframework.binding.collection.MapAdaptable
asMap
 

Method Detail

put

V put(java.lang.String attributeName,
      V attributeValue)
Put the attribute into this map.

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.

Parameters:
attributeName - the attribute name
attributeValue - the attribute value
Returns:
the previous value of the attribute, or null of there was no previous value

putAll

MutableAttributeMap<V> putAll(AttributeMap<? extends V> attributes)
Put all the attributes into this map.

Parameters:
attributes - the attributes to put into this map
Returns:
this, to support call chaining

removeAll

MutableAttributeMap<V> removeAll(MutableAttributeMap<? extends V> attributes)
Remove all attributes in the map provided from this map.

Parameters:
attributes - the attributes to remove from this map
Returns:
this, to support call chaining

remove

java.lang.Object remove(java.lang.String attributeName)
Remove an attribute from this map.

Parameters:
attributeName - the name of the attribute to remove
Returns:
previous value associated with specified attribute name, or null if there was no mapping for the name

extract

java.lang.Object extract(java.lang.String attributeName)
Extract an attribute from this map, getting it and removing it in a single operation.

Parameters:
attributeName - the attribute name
Returns:
the value of the attribute, or null of there was no value

clear

MutableAttributeMap<V> clear()
Remove all attributes in this map.

Returns:
this, to support call chaining

replaceWith

MutableAttributeMap<V> replaceWith(AttributeMap<? extends V> attributes)
                                   throws java.lang.UnsupportedOperationException
Replace the contents of this attribute map with the contents of the provided collection.

Parameters:
attributes - the attribute collection
Returns:
this, to support call chaining
Throws:
java.lang.UnsupportedOperationException

Spring Web Flow