Spring Web Flow

org.springframework.binding.collection
Class StringKeyedMapAdapter<V>

java.lang.Object
  extended by org.springframework.binding.collection.StringKeyedMapAdapter<V>
All Implemented Interfaces:
java.util.Map<java.lang.String,V>
Direct Known Subclasses:
HttpServletContextMap, HttpServletRequestMap, HttpServletRequestParameterMap, HttpSessionMap, InitParameterMap, PortletContextMap, PortletRequestMap, PortletRequestParameterMap, PortletSessionMap, RequestParameterMap, RequestPropertyMap

public abstract class StringKeyedMapAdapter<V>
extends java.lang.Object
implements java.util.Map<java.lang.String,V>

Base class for map adapters whose keys are String values. Concrete classes need only implement the abstract hook methods defined by this class.

Author:
Keith Donald

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
StringKeyedMapAdapter()
           
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set<java.util.Map.Entry<java.lang.String,V>> entrySet()
           
 V get(java.lang.Object key)
           
protected abstract  V getAttribute(java.lang.String key)
          Hook method that needs to be implemented by concrete subclasses.
protected abstract  java.util.Iterator<java.lang.String> getAttributeNames()
          Hook method that needs to be implemented by concrete subclasses.
 boolean isEmpty()
           
 java.util.Set<java.lang.String> keySet()
           
 V put(java.lang.String key, V value)
           
 void putAll(java.util.Map<? extends java.lang.String,? extends V> map)
           
 V remove(java.lang.Object key)
           
protected abstract  void removeAttribute(java.lang.String key)
          Hook method that needs to be implemented by concrete subclasses.
protected abstract  void setAttribute(java.lang.String key, V value)
          Hook method that needs to be implemented by concrete subclasses.
 int size()
           
 java.util.Collection<V> values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

StringKeyedMapAdapter

public StringKeyedMapAdapter()
Method Detail

clear

public void clear()
Specified by:
clear in interface java.util.Map<java.lang.String,V>

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map<java.lang.String,V>

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map<java.lang.String,V>

entrySet

public java.util.Set<java.util.Map.Entry<java.lang.String,V>> entrySet()
Specified by:
entrySet in interface java.util.Map<java.lang.String,V>

get

public V get(java.lang.Object key)
Specified by:
get in interface java.util.Map<java.lang.String,V>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map<java.lang.String,V>

keySet

public java.util.Set<java.lang.String> keySet()
Specified by:
keySet in interface java.util.Map<java.lang.String,V>

put

public V put(java.lang.String key,
             V value)
Specified by:
put in interface java.util.Map<java.lang.String,V>

putAll

public void putAll(java.util.Map<? extends java.lang.String,? extends V> map)
Specified by:
putAll in interface java.util.Map<java.lang.String,V>

remove

public V remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<java.lang.String,V>

size

public int size()
Specified by:
size in interface java.util.Map<java.lang.String,V>

values

public java.util.Collection<V> values()
Specified by:
values in interface java.util.Map<java.lang.String,V>

getAttribute

protected abstract V getAttribute(java.lang.String key)
Hook method that needs to be implemented by concrete subclasses. Gets a value associated with a key.

Parameters:
key - the key to lookup
Returns:
the associated value, or null if none

setAttribute

protected abstract void setAttribute(java.lang.String key,
                                     V value)
Hook method that needs to be implemented by concrete subclasses. Puts a key-value pair in the map, overwriting any possible earlier value associated with the same key.

Parameters:
key - the key to associate the value with
value - the value to associate with the key

removeAttribute

protected abstract void removeAttribute(java.lang.String key)
Hook method that needs to be implemented by concrete subclasses. Removes a key and its associated value from the map.

Parameters:
key - the key to remove

getAttributeNames

protected abstract java.util.Iterator<java.lang.String> getAttributeNames()
Hook method that needs to be implemented by concrete subclasses. Returns an enumeration listing all keys known to the map.

Returns:
the key enumeration

Spring Web Flow