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

## com.opensymphony.xwork2.util
Class XWorkMap

    java.lang.Object
      java.util.AbstractMap<K,V>
          java.util.HashMap
              com.opensymphony.xwork2.util.XWorkMap

All Implemented Interfaces:
  Serializable, Cloneable, Map

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

Field Summary
`private Class` | `clazz` Deprecated.

Constructor Summary
`XWorkMap(Class clazz)` Deprecated.

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.

Methods inherited from class java.util.HashMap
`clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, remove, size, values`

Methods inherited from class java.util.AbstractMap
`equals, hashCode, toString`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Field Detail

### clazz

    private Class clazz

  Deprecated.

Constructor Detail

### XWorkMap

    public XWorkMap(Class clazz)

  Deprecated.

Method Detail

### 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.

  Specified by:
    `get` in interface `Map`
  Overrides:
    `get` in class `HashMap`
  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.

  Specified by:
    `put` in interface `Map`
  Overrides:
    `put` in class `HashMap`
  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.

  Specified by:
    `putAll` in interface `Map`
  Overrides:
    `putAll` in class `HashMap`
  Parameters:
    `m` - mappings to be stored in this map.
  Throws:
    `NullPointerException` - if the specified map is null.

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

Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.