com.opensymphony.xwork.util
Class XWorkMap
java.lang.Object
java.util.AbstractMap
java.util.HashMap
com.opensymphony.xwork.util.XWorkMap
- All Implemented Interfaces:
- Cloneable, Map, Serializable
Deprecated. Native support for expanding lists and maps is provided in XWork 1.1, so this is no longer needed.
- public class XWorkMap
- extends HashMap
A simple map that guarantees that retrieving objects will never return null and insertions will
perform type conversion if necessary. Empty beans will be created for any key that would
normally returned null using ObjectFactory's
buildBean
method.
- Author:
- Patrick Lightbody, Mark Woon
- See Also:
- Serialized Form
Method Summary |
Object |
get(Object key)
Deprecated. Returns the value to which the specified key is mapped in this identity hash map. |
Object |
put(Object key,
Object value)
Deprecated. Associates the specified value with the specified key in this map. |
void |
putAll(Map m)
Deprecated. Copies all of the mappings from the specified map to this map These mappings will replace any
mappings that this map had for any of the keys currently in the specified map. |
XWorkMap
public XWorkMap(Class clazz)
- Deprecated.
get
public Object get(Object key)
- Deprecated.
- Returns the value to which the specified key is mapped in this identity hash map. If there
is no mapping for this key, create an appropriate object for this key, put it in the map, and
return the new object. Use
HashMap.containsKey(Object)
to check if there really is a
mapping for a key or not.
- Parameters:
key
- the key whose associated value is to be returned.
- Returns:
- the value to which this map maps the specified key
put
public Object put(Object key,
Object value)
- Deprecated.
- Associates the specified value with the specified key in this map. If the map previously
contained a mapping for this key, the old value is replaced.
- Parameters:
key
- key with which the specified value is to be associated.value
- value to be associated with the specified key.
- Returns:
- previous value associated with specified key, or null if there was no
mapping for key. A null return can also indicate that the HashMap
previously associated null with the specified key.
putAll
public void putAll(Map m)
- Deprecated.
- Copies all of the mappings from the specified map to this map These mappings will replace any
mappings that this map had for any of the keys currently in the specified map.
- Parameters:
m
- mappings to be stored in this map.
- Throws:
NullPointerException
- if the specified map is null.