uk.me.parabola.util
Class MultiHashMap<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,java.util.List<V>>
          extended by uk.me.parabola.util.MultiHashMap<K,V>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<K,java.util.List<V>>

public class MultiHashMap<K,V>
extends java.util.HashMap<K,java.util.List<V>>

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Constructor Summary
MultiHashMap()
           
 
Method Summary
 V add(K key, V value)
           
 java.util.List<V> get(K key)
          Returns the list of values associated with the given key.
 V remove(K key, V value)
           
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, 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

MultiHashMap

public MultiHashMap()
Method Detail

get

public java.util.List<V> get(K key)
Returns the list of values associated with the given key.

Parameters:
key - the key to get the values for.
Returns:
a list of values for the given keys or the empty list of no such value exist.

add

public V add(K key,
             V value)

remove

public V remove(K key,
                V value)