| org.springframework.webflow.core.collection.AttributeMap
AttributeMap | public interface AttributeMap extends MapAdaptable(Code) | | An immutable interface for accessing attributes in a backing map with string keys.
Implementations can optionally support
AttributeMapBindingListener listeners that will be notified when they're bound in or unbound from the map.
author: Keith Donald |
Method Summary | |
public boolean | contains(String attributeName) | public boolean | contains(String attributeName, Class requiredType) | public Object | get(String attributeName) Get an attribute value out of this map, returning null if
not found. | public Object | get(String attributeName, Object defaultValue) Get an attribute value, returning the default value if no value is found. | public Object | get(String attributeName, Class requiredType) Get an attribute value, asserting the value is of the required type. | public Object | get(String attributeName, Class requiredType, Object defaultValue) Get an attribute value, asserting the value is of the required type and
returning the default value if not found. | public Object[] | getArray(String attributeName, Class requiredType) Returns an array attribute value in the map and makes sure it is of the
required type. | public Boolean | getBoolean(String attributeName) Returns a boolean attribute value in the map, returning null
if no value was found. | public Boolean | getBoolean(String attributeName, Boolean defaultValue) Returns a boolean attribute value in the map, returning the default value
if no value was found. | public Collection | getCollection(String attributeName) Returns a collection attribute value in the map. | public Collection | getCollection(String attributeName, Class requiredType) Returns a collection attribute value in the map and make sure it is of
the required type. | public Integer | getInteger(String attributeName) Returns an integer attribute value in the map, returning
null if no value was found. | public Integer | getInteger(String attributeName, Integer defaultValue) Returns an integer attribute value in the map, returning the default
value if no value was found. | public Long | getLong(String attributeName) Returns a long attribute value in the map, returning null
if no value was found. | public Long | getLong(String attributeName, Long defaultValue) Returns a long attribute value in the map, returning the default value if
no value was found. | public Number | getNumber(String attributeName, Class requiredType) Returns a number attribute value in the map that is of the specified
type, returning null if no value was found. | public Number | getNumber(String attributeName, Class requiredType, Number defaultValue) Returns a number attribute value in the map of the specified type,
returning the default value if no value was found. | public Object | getRequired(String attributeName) Get the value of a required attribute, throwing an exception of no
attribute is found. | public Object | getRequired(String attributeName, Class requiredType) Get the value of a required attribute and make sure it is of the required
type. | public Object[] | getRequiredArray(String attributeName, Class requiredType) Returns an array attribute value in the map, throwing an exception if the
attribute is not present or not an array of the required type. | public Boolean | getRequiredBoolean(String attributeName) Returns a boolean attribute value in the map, throwing an exception if
the attribute is not present and of the correct type. | public Collection | getRequiredCollection(String attributeName) Returns a collection attribute value in the map, throwing an exception if
the attribute is not present or not a collection. | public Collection | getRequiredCollection(String attributeName, Class requiredType) Returns a collection attribute value in the map, throwing an exception if
the attribute is not present or not a collection of the required type. | public Integer | getRequiredInteger(String attributeName) Returns an integer attribute value in the map, throwing an exception if
the attribute is not present and of the correct type. | public Long | getRequiredLong(String attributeName) Returns a long attribute value in the map, throwing an exception if the
attribute is not present and of the correct type. | public Number | getRequiredNumber(String attributeName, Class requiredType) Returns a number attribute value in the map, throwing an exception if the
attribute is not present and of the correct type. | public String | getRequiredString(String attributeName) Returns a string attribute value in the map, throwing an exception if the
attribute is not present and of the correct type. | public String | getString(String attributeName) Returns a string attribute value in the map, returning null
if no value was found. | public String | getString(String attributeName, String defaultValue) Returns a string attribute value in the map, returning the default value
if no value was found. | public boolean | isEmpty() | public int | size() Returns the size of this map. | public AttributeMap | union(AttributeMap attributes) Returns a new attribute map containing the union of this map with the
provided map. |
contains | public boolean contains(String attributeName)(Code) | | Does the attribute with the provided name exist in this map?
Parameters: attributeName - the attribute name true if so, false otherwise |
contains | public boolean contains(String attributeName, Class requiredType) throws IllegalArgumentException(Code) | | Does the attribute with the provided name exist in this map and is its
value of the specified required type?
Parameters: attributeName - the attribute name Parameters: requiredType - the required class of the attribute value true if so, false otherwise throws: IllegalArgumentException - when the value is not of the requiredtype |
get | public Object get(String attributeName)(Code) | | Get an attribute value out of this map, returning null if
not found.
Parameters: attributeName - the attribute name the attribute value |
get | public Object get(String attributeName, Object defaultValue)(Code) | | Get an attribute value, returning the default value if no value is found.
Parameters: attributeName - the name of the attribute Parameters: defaultValue - the default value the attribute value, falling back to the default if no suchattribute exists |
get | public Object get(String attributeName, Class requiredType) throws IllegalArgumentException(Code) | | Get an attribute value, asserting the value is of the required type.
Parameters: attributeName - the name of the attribute Parameters: requiredType - the required type of the attribute value the attribute value, or null if not found throws: IllegalArgumentException - when the value is not of the requiredtype |
get | public Object get(String attributeName, Class requiredType, Object defaultValue) throws IllegalStateException(Code) | | Get an attribute value, asserting the value is of the required type and
returning the default value if not found.
Parameters: attributeName - the name of the attribute Parameters: requiredType - the value required type Parameters: defaultValue - the default value the attribute value, or the default if not found throws: IllegalArgumentException - when the value (if found) is not of therequired type |
getArray | public Object[] getArray(String attributeName, Class requiredType) throws IllegalArgumentException(Code) | | Returns an array attribute value in the map and makes sure it is of the
required type.
Parameters: attributeName - the attribute name Parameters: requiredType - the required type of the attribute value the array attribute value throws: IllegalArgumentException - if the attribute is present but not anarray of the required type |
getBoolean | public Boolean getBoolean(String attributeName, Boolean defaultValue) throws IllegalArgumentException(Code) | | Returns a boolean attribute value in the map, returning the default value
if no value was found.
Parameters: attributeName - the attribute name Parameters: defaultValue - the default the boolean attribute value throws: IllegalArgumentException - if the attribute is present but not aboolean |
getCollection | public Collection getCollection(String attributeName, Class requiredType) throws IllegalArgumentException(Code) | | Returns a collection attribute value in the map and make sure it is of
the required type.
Parameters: attributeName - the attribute name Parameters: requiredType - the required type of the attribute value the collection attribute value throws: IllegalArgumentException - if the attribute is present but not acollection of the required type |
getInteger | public Integer getInteger(String attributeName) throws IllegalArgumentException(Code) | | Returns an integer attribute value in the map, returning
null if no value was found.
Parameters: attributeName - the attribute name the integer attribute value throws: IllegalArgumentException - if the attribute is present but not aninteger |
getInteger | public Integer getInteger(String attributeName, Integer defaultValue) throws IllegalArgumentException(Code) | | Returns an integer attribute value in the map, returning the default
value if no value was found.
Parameters: attributeName - the attribute name Parameters: defaultValue - the default the integer attribute value throws: IllegalArgumentException - if the attribute is present but not aninteger |
getLong | public Long getLong(String attributeName, Long defaultValue) throws IllegalArgumentException(Code) | | Returns a long attribute value in the map, returning the default value if
no value was found.
Parameters: attributeName - the attribute name Parameters: defaultValue - the default the long attribute value throws: IllegalArgumentException - if the attribute is present but not along |
getNumber | public Number getNumber(String attributeName, Class requiredType) throws IllegalArgumentException(Code) | | Returns a number attribute value in the map that is of the specified
type, returning null if no value was found.
Parameters: attributeName - the attribute name Parameters: requiredType - the required number type the number attribute value throws: IllegalArgumentException - if the attribute is present but not anumber of the required type |
getNumber | public Number getNumber(String attributeName, Class requiredType, Number defaultValue) throws IllegalArgumentException(Code) | | Returns a number attribute value in the map of the specified type,
returning the default value if no value was found.
Parameters: attributeName - the attribute name Parameters: defaultValue - the default the number attribute value throws: IllegalArgumentException - if the attribute is present but not anumber of the required type |
getRequired | public Object getRequired(String attributeName, Class requiredType) throws IllegalArgumentException(Code) | | Get the value of a required attribute and make sure it is of the required
type.
Parameters: attributeName - name of the attribute to get Parameters: requiredType - the required type of the attribute value the attribute value throws: IllegalArgumentException - when the attribute is not found or notof the required type |
getRequiredArray | public Object[] getRequiredArray(String attributeName, Class requiredType) throws IllegalArgumentException(Code) | | Returns an array attribute value in the map, throwing an exception if the
attribute is not present or not an array of the required type.
Parameters: attributeName - the attribute name Parameters: requiredType - the required array type the collection attribute value throws: IllegalArgumentException - if the attribute is not present or ispresent but not a array of the required type |
getRequiredBoolean | public Boolean getRequiredBoolean(String attributeName) throws IllegalArgumentException(Code) | | Returns a boolean attribute value in the map, throwing an exception if
the attribute is not present and of the correct type.
Parameters: attributeName - the attribute name the boolean attribute value throws: IllegalArgumentException - if the attribute is not present orpresent but is not a boolean |
getRequiredCollection | public Collection getRequiredCollection(String attributeName) throws IllegalArgumentException(Code) | | Returns a collection attribute value in the map, throwing an exception if
the attribute is not present or not a collection.
Parameters: attributeName - the attribute name the collection attribute value throws: IllegalArgumentException - if the attribute is not present or ispresent but not a collection |
getRequiredCollection | public Collection getRequiredCollection(String attributeName, Class requiredType) throws IllegalArgumentException(Code) | | Returns a collection attribute value in the map, throwing an exception if
the attribute is not present or not a collection of the required type.
Parameters: attributeName - the attribute name Parameters: requiredType - the required collection type the collection attribute value throws: IllegalArgumentException - if the attribute is not present or ispresent but not a collection of the required type |
getRequiredInteger | public Integer getRequiredInteger(String attributeName) throws IllegalArgumentException(Code) | | Returns an integer attribute value in the map, throwing an exception if
the attribute is not present and of the correct type.
Parameters: attributeName - the attribute name the integer attribute value throws: IllegalArgumentException - if the attribute is not present orpresent but not an integer |
getRequiredLong | public Long getRequiredLong(String attributeName) throws IllegalArgumentException(Code) | | Returns a long attribute value in the map, throwing an exception if the
attribute is not present and of the correct type.
Parameters: attributeName - the attribute name the long attribute value throws: IllegalArgumentException - if the attribute is not present orpresent but not a long |
getRequiredNumber | public Number getRequiredNumber(String attributeName, Class requiredType) throws IllegalArgumentException(Code) | | Returns a number attribute value in the map, throwing an exception if the
attribute is not present and of the correct type.
Parameters: attributeName - the attribute name the number attribute value throws: IllegalArgumentException - if the attribute is not present orpresent but not a number of the required type |
getRequiredString | public String getRequiredString(String attributeName) throws IllegalArgumentException(Code) | | Returns a string attribute value in the map, throwing an exception if the
attribute is not present and of the correct type.
Parameters: attributeName - the attribute name the string attribute value throws: IllegalArgumentException - if the attribute is not present orpresent but not a string |
getString | public String getString(String attributeName, String defaultValue) throws IllegalArgumentException(Code) | | Returns a string attribute value in the map, returning the default value
if no value was found.
Parameters: attributeName - the attribute name Parameters: defaultValue - the default the string attribute value throws: IllegalArgumentException - if the attribute is present but not astring |
isEmpty | public boolean isEmpty()(Code) | | Is this attribute map empty with a size of 0?
true if empty, false if not |
size | public int size()(Code) | | Returns the size of this map.
the nubmer of entries in the map |
union | public AttributeMap union(AttributeMap attributes)(Code) | | Returns a new attribute map containing the union of this map with the
provided map.
Parameters: attributes - the map to combine with this map a new, combined map |
|
|