net.sf.molae.pipe.genimpl
Class MapBackedMapEntry<K,V>

java.lang.Object
  extended by net.sf.molae.pipe.basic.AbstractMapEntry<K,V>
      extended by net.sf.molae.pipe.genimpl.MapBackedMapEntry<K,V>
All Implemented Interfaces:
Map.Entry<K,V>

public final class MapBackedMapEntry<K,V>
extends AbstractMapEntry<K,V>

Defines a map entry on the base of Map.get(Object) and Map.put(Object,Object).


Constructor Summary
MapBackedMapEntry(Map<K,V> base, K key)
          Constructs a new map backed map entry.
 
Method Summary
 V getValue()
          Calls the corresponding method (get) of the base map.
 V setValue(V value)
          Calls the corresponding method (put) of the base map.
 
Methods inherited from class net.sf.molae.pipe.basic.AbstractMapEntry
equals, getKey, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapBackedMapEntry

public MapBackedMapEntry(Map<K,V> base,
                         K key)
Constructs a new map backed map entry.

Parameters:
base - The base map.
key - The key of this map entry.
Throws:
NullPointerException - if the specified map is null.
Method Detail

getValue

public V getValue()
Calls the corresponding method (get) of the base map.

Specified by:
getValue in interface Map.Entry<K,V>
Specified by:
getValue in class AbstractMapEntry<K,V>
See Also:
setValue(V)

setValue

public V setValue(V value)
Calls the corresponding method (put) of the base map.

Specified by:
setValue in interface Map.Entry<K,V>
Overrides:
setValue in class AbstractMapEntry<K,V>
Throws:
UnsupportedOperationException - depending on the base map
ClassCastException - depending on the base map
IllegalArgumentException - depending on the base map
NullPointerException - depending on the base map
See Also:
getValue()