Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.webflow.core.collection
Interface AttributeMap

All Superinterfaces:
  MapAdaptable

All Known Subinterfaces:
  MutableAttributeMap, SharedAttributeMap

All Known Implementing Classes:
  LocalAttributeMap, LocalSharedAttributeMap

    public interface AttributeMap

extends MapAdaptable

An immutable interface for accessing 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
`boolean` | `contains(java.lang.String attributeName)` Does the attribute with the provided name exist in this map?
`boolean` | `contains(java.lang.String attributeName, java.lang.Class requiredType)` Does the attribute with the provided name exist in this map and is its value of the specified required type?
`java.lang.Object` | `get(java.lang.String attributeName)` Get an attribute value out of this map, returning `null` if not found.
`java.lang.Object` | `get(java.lang.String attributeName, java.lang.Class requiredType)` Get an attribute value, asserting the value is of the required type.
`java.lang.Object` | `get(java.lang.String attributeName, java.lang.Class requiredType, java.lang.Object defaultValue)` Get an attribute value, asserting the value is of the required type and returning the default value if not found.
`java.lang.Object` | `get(java.lang.String attributeName, java.lang.Object defaultValue)` Get an attribute value, returning the default value if no value is found.
`java.lang.Object[]` | `getArray(java.lang.String attributeName, java.lang.Class requiredType)` Returns an array attribute value in the map and makes sure it is of the required type.
`java.lang.Boolean` | `getBoolean(java.lang.String attributeName)` Returns a boolean attribute value in the map, returning `null` if no value was found.
`java.lang.Boolean` | `getBoolean(java.lang.String attributeName, java.lang.Boolean defaultValue)` Returns a boolean attribute value in the map, returning the default value if no value was found.
`java.util.Collection` | `getCollection(java.lang.String attributeName)` Returns a collection attribute value in the map.
`java.util.Collection` | `getCollection(java.lang.String attributeName, java.lang.Class requiredType)` Returns a collection attribute value in the map and make sure it is of the required type.
`java.lang.Integer` | `getInteger(java.lang.String attributeName)` Returns an integer attribute value in the map, returning `null` if no value was found.
`java.lang.Integer` | `getInteger(java.lang.String attributeName, java.lang.Integer defaultValue)` Returns an integer attribute value in the map, returning the default value if no value was found.
`java.lang.Long` | `getLong(java.lang.String attributeName)` Returns a long attribute value in the map, returning `null` if no value was found.
`java.lang.Long` | `getLong(java.lang.String attributeName, java.lang.Long defaultValue)` Returns a long attribute value in the map, returning the default value if no value was found.
`java.lang.Number` | `getNumber(java.lang.String attributeName, java.lang.Class requiredType)` Returns a number attribute value in the map that is of the specified type, returning `null` if no value was found.
`java.lang.Number` | `getNumber(java.lang.String attributeName, java.lang.Class requiredType, java.lang.Number defaultValue)` Returns a number attribute value in the map of the specified type, returning the default value if no value was found.
`java.lang.Object` | `getRequired(java.lang.String attributeName)` Get the value of a required attribute, throwing an exception of no attribute is found.
`java.lang.Object` | `getRequired(java.lang.String attributeName, java.lang.Class requiredType)` Get the value of a required attribute and make sure it is of the required type.
`java.lang.Object[]` | `getRequiredArray(java.lang.String attributeName, java.lang.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.
`java.lang.Boolean` | `getRequiredBoolean(java.lang.String attributeName)` Returns a boolean attribute value in the map, throwing an exception if the attribute is not present and of the correct type.
`java.util.Collection` | `getRequiredCollection(java.lang.String attributeName)` Returns a collection attribute value in the map, throwing an exception if the attribute is not present or not a collection.
`java.util.Collection` | `getRequiredCollection(java.lang.String attributeName, java.lang.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.
`java.lang.Integer` | `getRequiredInteger(java.lang.String attributeName)` Returns an integer attribute value in the map, throwing an exception if the attribute is not present and of the correct type.
`java.lang.Long` | `getRequiredLong(java.lang.String attributeName)` Returns a long attribute value in the map, throwing an exception if the attribute is not present and of the correct type.
`java.lang.Number` | `getRequiredNumber(java.lang.String attributeName, java.lang.Class requiredType)` Returns a number attribute value in the map, throwing an exception if the attribute is not present and of the correct type.
`java.lang.String` | `getRequiredString(java.lang.String attributeName)` Returns a string attribute value in the map, throwing an exception if the attribute is not present and of the correct type.
`java.lang.String` | `getString(java.lang.String attributeName)` Returns a string attribute value in the map, returning `null` if no value was found.
`java.lang.String` | `getString(java.lang.String attributeName, java.lang.String defaultValue)` Returns a string attribute value in the map, returning the default value if no value was found.
`boolean` | `isEmpty()` Is this attribute map empty with a size of 0?
`int` | `size()` Returns the size of this map.
`AttributeMap` | `union(AttributeMap attributes)` Returns a new attribute map containing the union of this map with the provided map.

Methods inherited from interface org.springframework.binding.collection.MapAdaptable
`asMap`

Method Detail

### get

    java.lang.Object get(java.lang.String attributeName)

  Get an attribute value out of this map, returning `null` if not found.

  Parameters:
    `attributeName` - the attribute name
  Returns:
    the attribute value

### size

    int size()

  Returns the size of this map.

  Returns:
    the number of entries in the map

### isEmpty

    boolean isEmpty()

  Is this attribute map empty with a size of 0?

  Returns:
    true if empty, false if not

### contains

    boolean contains(java.lang.String attributeName)

  Does the attribute with the provided name exist in this map?

  Parameters:
    `attributeName` - the attribute name
  Returns:
    true if so, false otherwise

### contains

    boolean contains(java.lang.String attributeName,
                     java.lang.Class requiredType)
                     throws java.lang.IllegalArgumentException

  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
    `requiredType` - the required class of the attribute value
  Returns:
    true if so, false otherwise
  Throws:
    `java.lang.IllegalArgumentException` - when the value is not of the required type

### get

    java.lang.Object get(java.lang.String attributeName,
                         java.lang.Object defaultValue)

  Get an attribute value, returning the default value if no value is found.

  Parameters:
    `attributeName` - the name of the attribute
    `defaultValue` - the default value
  Returns:
    the attribute value, falling back to the default if no such attribute exists

### get

    java.lang.Object get(java.lang.String attributeName,
                         java.lang.Class requiredType)
                         throws java.lang.IllegalArgumentException

  Get an attribute value, asserting the value is of the required type.

  Parameters:
    `attributeName` - the name of the attribute
    `requiredType` - the required type of the attribute value
  Returns:
    the attribute value, or null if not found
  Throws:
    `java.lang.IllegalArgumentException` - when the value is not of the required type

### get

    java.lang.Object get(java.lang.String attributeName,
                         java.lang.Class requiredType,
                         java.lang.Object defaultValue)
                         throws java.lang.IllegalStateException

  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
    `requiredType` - the value required type
    `defaultValue` - the default value
  Returns:
    the attribute value, or the default if not found
  Throws:
    `java.lang.IllegalArgumentException` - when the value (if found) is not of the required type
    `java.lang.IllegalStateException`

### getRequired

    java.lang.Object getRequired(java.lang.String attributeName)
                                 throws java.lang.IllegalArgumentException

  Get the value of a required attribute, throwing an exception of no attribute is found.

  Parameters:
    `attributeName` - the name of the attribute
  Returns:
    the attribute value
  Throws:
    `java.lang.IllegalArgumentException` - when the attribute is not found

### getRequired

    java.lang.Object getRequired(java.lang.String attributeName,
                                 java.lang.Class requiredType)
                                 throws java.lang.IllegalArgumentException

  Get the value of a required attribute and make sure it is of the required type.

  Parameters:
    `attributeName` - name of the attribute to get
    `requiredType` - the required type of the attribute value
  Returns:
    the attribute value
  Throws:
    `java.lang.IllegalArgumentException` - when the attribute is not found or not of the required type

### getString

    java.lang.String getString(java.lang.String attributeName)
                               throws java.lang.IllegalArgumentException

  Returns a string attribute value in the map, returning `null` if no value was found.

  Parameters:
    `attributeName` - the attribute name
  Returns:
    the string attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a string

### getString

    java.lang.String getString(java.lang.String attributeName,
                               java.lang.String defaultValue)
                               throws java.lang.IllegalArgumentException

  Returns a string attribute value in the map, returning the default value if no value was found.

  Parameters:
    `attributeName` - the attribute name
    `defaultValue` - the default
  Returns:
    the string attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a string

### getRequiredString

    java.lang.String getRequiredString(java.lang.String attributeName)
                                       throws java.lang.IllegalArgumentException

  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
  Returns:
    the string attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is not present or present but not a string

### getCollection

    java.util.Collection getCollection(java.lang.String attributeName)
                                       throws java.lang.IllegalArgumentException

  Returns a collection attribute value in the map.

  Parameters:
    `attributeName` - the attribute name
  Returns:
    the collection attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a collection

### getCollection

    java.util.Collection getCollection(java.lang.String attributeName,
                                       java.lang.Class requiredType)
                                       throws java.lang.IllegalArgumentException

  Returns a collection attribute value in the map and make sure it is of the required type.

  Parameters:
    `attributeName` - the attribute name
    `requiredType` - the required type of the attribute value
  Returns:
    the collection attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a collection of the required type

### getRequiredCollection

    java.util.Collection getRequiredCollection(java.lang.String attributeName)
                                               throws java.lang.IllegalArgumentException

  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
  Returns:
    the collection attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is not present or is present but not a collection

### getRequiredCollection

    java.util.Collection getRequiredCollection(java.lang.String attributeName,
                                               java.lang.Class requiredType)
                                               throws java.lang.IllegalArgumentException

  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
    `requiredType` - the required collection type
  Returns:
    the collection attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is not present or is present but not a collection of the required type

### getArray

    java.lang.Object[] getArray(java.lang.String attributeName,
                                java.lang.Class requiredType)
                                throws java.lang.IllegalArgumentException

  Returns an array attribute value in the map and makes sure it is of the required type.

  Parameters:
    `attributeName` - the attribute name
    `requiredType` - the required type of the attribute value
  Returns:
    the array attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not an array of the required type

### getRequiredArray

    java.lang.Object[] getRequiredArray(java.lang.String attributeName,
                                        java.lang.Class requiredType)
                                        throws java.lang.IllegalArgumentException

  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
    `requiredType` - the required array type
  Returns:
    the collection attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is not present or is present but not a array of the required type

### getNumber

    java.lang.Number getNumber(java.lang.String attributeName,
                               java.lang.Class requiredType)
                               throws java.lang.IllegalArgumentException

  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
    `requiredType` - the required number type
  Returns:
    the number attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a number of the required type

### getNumber

    java.lang.Number getNumber(java.lang.String attributeName,
                               java.lang.Class requiredType,
                               java.lang.Number defaultValue)
                               throws java.lang.IllegalArgumentException

  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
    `defaultValue` - the default
  Returns:
    the number attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a number of the required type

### getRequiredNumber

    java.lang.Number getRequiredNumber(java.lang.String attributeName,
                                       java.lang.Class requiredType)
                                       throws java.lang.IllegalArgumentException

  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
  Returns:
    the number attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is not present or present but not a number of the required type

### getInteger

    java.lang.Integer getInteger(java.lang.String attributeName)
                                 throws java.lang.IllegalArgumentException

  Returns an integer attribute value in the map, returning `null` if no value was found.

  Parameters:
    `attributeName` - the attribute name
  Returns:
    the integer attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not an integer

### getInteger

    java.lang.Integer getInteger(java.lang.String attributeName,
                                 java.lang.Integer defaultValue)
                                 throws java.lang.IllegalArgumentException

  Returns an integer attribute value in the map, returning the default value if no value was found.

  Parameters:
    `attributeName` - the attribute name
    `defaultValue` - the default
  Returns:
    the integer attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not an integer

### getRequiredInteger

    java.lang.Integer getRequiredInteger(java.lang.String attributeName)
                                         throws java.lang.IllegalArgumentException

  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
  Returns:
    the integer attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is not present or present but not an integer

### getLong

    java.lang.Long getLong(java.lang.String attributeName)
                           throws java.lang.IllegalArgumentException

  Returns a long attribute value in the map, returning `null` if no value was found.

  Parameters:
    `attributeName` - the attribute name
  Returns:
    the long attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a long

### getLong

    java.lang.Long getLong(java.lang.String attributeName,
                           java.lang.Long defaultValue)
                           throws java.lang.IllegalArgumentException

  Returns a long attribute value in the map, returning the default value if no value was found.

  Parameters:
    `attributeName` - the attribute name
    `defaultValue` - the default
  Returns:
    the long attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a long

### getRequiredLong

    java.lang.Long getRequiredLong(java.lang.String attributeName)
                                   throws java.lang.IllegalArgumentException

  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
  Returns:
    the long attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is not present or present but not a long

### getBoolean

    java.lang.Boolean getBoolean(java.lang.String attributeName)
                                 throws java.lang.IllegalArgumentException

  Returns a boolean attribute value in the map, returning `null` if no value was found.

  Parameters:
    `attributeName` - the attribute name
  Returns:
    the long attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a boolean

### getBoolean

    java.lang.Boolean getBoolean(java.lang.String attributeName,
                                 java.lang.Boolean defaultValue)
                                 throws java.lang.IllegalArgumentException

  Returns a boolean attribute value in the map, returning the default value if no value was found.

  Parameters:
    `attributeName` - the attribute name
    `defaultValue` - the default
  Returns:
    the boolean attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is present but not a boolean

### getRequiredBoolean

    java.lang.Boolean getRequiredBoolean(java.lang.String attributeName)
                                         throws java.lang.IllegalArgumentException

  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
  Returns:
    the boolean attribute value
  Throws:
    `java.lang.IllegalArgumentException` - if the attribute is not present or present but is not a boolean

### union

    AttributeMap union(AttributeMap attributes)

  Returns a new attribute map containing the union of this map with the provided map.

  Parameters:
    `attributes` - the map to combine with this map
  Returns:
    a new, combined map

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Web Flow
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD