net.sf.molae.pipe.trafo
Class MapEntryProxy<K,V>
java.lang.Object
net.sf.molae.pipe.basic.AbstractMapEntry<K,V>
net.sf.molae.pipe.trafo.MapEntryProxy<K,V>
- All Implemented Interfaces:
- Map.Entry<K,V>
public final class MapEntryProxy<K,V>
- extends AbstractMapEntry<K,V>
A map entry that delegates calls to another map entry.
Only getValue and setValue calls are
delegated.
All other methods are inherited.
- Since:
- 1.1
|
Method Summary |
V |
getValue()
|
V |
setValue(V value)
Replaces the value corresponding to this entry with the specified value. |
MapEntryProxy
public MapEntryProxy(K key,
Map.Entry<?,V> base)
- Constructs a MapEntryProxy object with an arbitrary key.
- Parameters:
key - key of this map entrybase - base map entry
- Throws:
NullPointerException - if the base entry is
null.
MapEntryProxy
public MapEntryProxy(Map.Entry<K,V> base)
- Constructs a MapEntryProxy object.
- Parameters:
base - base map entry
- Throws:
NullPointerException - if the base entry is
null.
getValue
public V getValue()
- Specified by:
getValue in interface Map.Entry<K,V>- Specified by:
getValue in class AbstractMapEntry<K,V>
setValue
public V setValue(V value)
- Replaces the value corresponding to this entry with the specified value.
- Specified by:
setValue in interface Map.Entry<K,V>- Overrides:
setValue in class AbstractMapEntry<K,V>
- Parameters:
value - new value to be stored in this entry
- Returns:
- old value corresponding to the entry.
- Throws:
UnsupportedOperationException - if the setValue
operation is not supported by the backing map entry.
ClassCastException - depending on the base entry
IllegalArgumentException - depending on the base entry
NullPointerException - the backing map entry does not permit
null values, and the specified value is null.- See Also:
getValue()