net.sf.molae.pipe.basic
Class ImmutableMapEntry<K,V>
java.lang.Object
net.sf.molae.pipe.basic.AbstractMapEntry<K,V>
net.sf.molae.pipe.basic.ImmutableMapEntry<K,V>
- All Implemented Interfaces:
- Map.Entry<K,V>
public final class ImmutableMapEntry<K,V>
- extends AbstractMapEntry<K,V>
An immutable bean with two properties: key(inherited from
AbstractMapEntry
) and value.
In contrast to DefaultMapEntry
the value is unmodifiable.
Intended for implementation of immutable maps.
Method Summary |
V |
getValue()
Returns the value of the value property. |
ImmutableMapEntry
public ImmutableMapEntry(K key,
V value)
- Constructs an ImmutableMapEntry object.
- Parameters:
key
- the key corresponding to this entry.value
- the value corresponding to this entry.
getValue
public V getValue()
- Returns the value of the value property.
- Specified by:
getValue
in interface Map.Entry<K,V>
- Specified by:
getValue
in class AbstractMapEntry<K,V>
- Returns:
- the value of the value property