net.kwfgrid.gwes.uiproxy
Class HashMapOfLists

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

public class HashMapOfLists
extends HashMap

A HashMap which maps keys to lists of values. This implementation is not thread-safe.

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
HashMapOfLists()
           
 
Method Summary
 List getList(Object key)
          Get the list mapped by the specified key.
 Object put(Object key, Object value)
          Add a value to the list of values mapped by the specified key.
 
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

HashMapOfLists

public HashMapOfLists()
Method Detail

getList

public List getList(Object key)
Get the list mapped by the specified key. This method will never return null. If no value is mapped by the specified key, an empty list will be returned.


put

public Object put(Object key,
                  Object value)
Add a value to the list of values mapped by the specified key.

Specified by:
put in interface Map
Overrides:
put in class HashMap
Returns:
The specified value.


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