org.iqual.util
Class MapCollection<K,V,C extends Collection<V>>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,C>
          extended by org.iqual.util.MapCollection<K,V,C>
All Implemented Interfaces:
Serializable, Cloneable, Map<K,C>
Direct Known Subclasses:
MapCollection.MapList, MapCollection.MapSet

public abstract class MapCollection<K,V,C extends Collection<V>>
extends HashMap<K,C>

Since:
31.10.2009 18:00:00
Author:
Zbynek Slajchrt
See Also:
Serialized Form

Nested Class Summary
static class MapCollection.MapList<K,V>
           
static class MapCollection.MapSet<K,V>
           
 
Constructor Summary
MapCollection()
           
 
Method Summary
 V getElement(K key)
           
protected abstract  C newCollection()
           
 void putElement(K key, V value)
           
 boolean removeElement(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

MapCollection

public MapCollection()
Method Detail

newCollection

protected abstract C newCollection()

putElement

public void putElement(K key,
                       V value)

removeElement

public boolean removeElement(K key,
                             V value)

getElement

public V getElement(K key)
             throws IllegalStateException
Parameters:
key -
Returns:
Throws:
IllegalStateException - if there are more than 1 element in the list stored under the key.


Copyright © 2009 iquality.org. All Rights Reserved.