net.sf.molae.pipe.genimpl
Class MapBackedMapEntry<K,V>
java.lang.Object
net.sf.molae.pipe.basic.AbstractMapEntry<K,V>
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)
.
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. |
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
.
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()