net.kwfgrid.gwes.uiproxy
Class HashMapOfMaps

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap
          extended by net.kwfgrid.gwes.uiproxy.HashMapOfMaps
All Implemented Interfaces:
Serializable, Cloneable, Map

public class HashMapOfMaps
extends HashMap

A two dimensional HashMap.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
HashMapOfMaps()
           
 
Method Summary
 Map createKey(Object key)
          Create a mapping from the specified key to an empty map.
 Object get(Object key1, Object key2)
          Get the value for a two dimensional mapping.
 Map getMap(Object key)
          Get the map the specified key is mapped to.
 Object put(Object key, Object value)
          Overridden.
 Object put(Object key1, Object key2, Object value)
          Create a two dimensional mapping for the specified keys and value.
 Object remove(Object key1, Object key2)
          Remove a two dimensional mapping.
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, putAll, 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
 

Constructor Detail

HashMapOfMaps

public HashMapOfMaps()
Method Detail

createKey

public Map createKey(Object key)
Create a mapping from the specified key to an empty map. If the key already exists this method will do nothing.

Returns:
The map the specified key is mapped to.

put

public Object put(Object key,
                  Object value)
Overridden. This method is not allowed for this class and thus does nothing.

Specified by:
put in interface Map
Overrides:
put in class HashMap
Returns:
null

put

public Object put(Object key1,
                  Object key2,
                  Object value)
Create a two dimensional mapping for the specified keys and value.

Returns:
The value formerly mapped to the specified keys (maybe null).

getMap

public Map getMap(Object key)
Get the map the specified key is mapped to.

Returns:
The map or null if no mapping for the specified key exists.

get

public Object get(Object key1,
                  Object key2)
Get the value for a two dimensional mapping.


remove

public Object remove(Object key1,
                     Object key2)
Remove a two dimensional mapping.

Returns:
The value formerly mapped to the specified keys.


Copyright © 2005-2011 Fraunhofer FIRST. All Rights Reserved.