net.sf.molae.pipe.basic
Class ImmutableMapEntry<K,V>

java.lang.Object
  extended by net.sf.molae.pipe.basic.AbstractMapEntry<K,V>
      extended by 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.


Constructor Summary
ImmutableMapEntry(K key, V value)
          Constructs an ImmutableMapEntry object.
 
Method Summary
 V getValue()
          Returns the value of the value property.
 
Methods inherited from class net.sf.molae.pipe.basic.AbstractMapEntry
equals, getKey, hashCode, setValue, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.
Method Detail

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