ikrs.util
Class MapDelegation<K,V>

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by ikrs.util.MapDelegation<K,V>
All Implemented Interfaces:
java.util.Map<K,V>
Direct Known Subclasses:
EnvironmentDelegation

public class MapDelegation<K,V>
extends java.util.AbstractMap<K,V>

The map delegation has a (previously passed) core map and all Map's method calls will be directly forwarded to the core map.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
MapDelegation(java.util.Map<K,V> coreMap)
          Creates a new MapDelegation from the given core map.
 
Method Summary
 void clear()
           
 java.util.Set<java.util.Map.Entry<K,V>> entrySet()
           
 V put(K key, V value)
           
 void putAll(java.util.Map<? extends K,? extends V> m)
           
 V remove(java.lang.Object key)
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.AbstractMap
clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapDelegation

public MapDelegation(java.util.Map<K,V> coreMap)
              throws java.lang.NullPointerException
Creates a new MapDelegation from the given core map.

Parameters:
coreMap - The actual core map (must not be null).
Throws:
java.lang.NullPointerException - If coreMap is null.
Method Detail

clear

public void clear()
Specified by:
clear in interface java.util.Map<K,V>
Overrides:
clear in class java.util.AbstractMap<K,V>

entrySet

public java.util.Set<java.util.Map.Entry<K,V>> entrySet()
Specified by:
entrySet in interface java.util.Map<K,V>
Specified by:
entrySet in class java.util.AbstractMap<K,V>

put

public V put(K key,
             V value)
Specified by:
put in interface java.util.Map<K,V>
Overrides:
put in class java.util.AbstractMap<K,V>

putAll

public void putAll(java.util.Map<? extends K,? extends V> m)
Specified by:
putAll in interface java.util.Map<K,V>
Overrides:
putAll in class java.util.AbstractMap<K,V>

remove

public V remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map<K,V>
Overrides:
remove in class java.util.AbstractMap<K,V>

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractMap<K,V>