nl.knowledgeplaza.util
Class KeyValueMapEntry<K,V>

java.lang.Object
  extended by nl.knowledgeplaza.util.AbstractMapEntry<K,V>
      extended by nl.knowledgeplaza.util.KeyValueMapEntry<K,V>
All Implemented Interfaces:
Map.Entry<K,V>

public class KeyValueMapEntry<K,V>
extends AbstractMapEntry<K,V>

Default implementation for AbstractMapEntry

Version:
$Revision: 1.2 $
Author:
$Author: toeukpap $

Constructor Summary
KeyValueMapEntry(K key, V value)
           
 
Method Summary
 K getKey()
          Returns the key corresponding to this entry.
 V getValue()
          Returns the value corresponding to this entry.
protected  K setKey(K newKey)
          For use in subclass implementations *only*.
 V setValue(V newValue)
          Replaces the value corresponding to this entry with the specified value (optional operation).
 
Methods inherited from class nl.knowledgeplaza.util.AbstractMapEntry
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeyValueMapEntry

public KeyValueMapEntry(K key,
                        V value)
Method Detail

getKey

public K getKey()
Description copied from class: AbstractMapEntry
Returns the key corresponding to this entry.

Specified by:
getKey in interface Map.Entry<K,V>
Specified by:
getKey in class AbstractMapEntry<K,V>

getValue

public V getValue()
Description copied from class: AbstractMapEntry
Returns the value corresponding to this entry. If the mapping has been removed from the backing map (by the iterator's remove() operation), the results of this call are undefined.

Specified by:
getValue in interface Map.Entry<K,V>
Specified by:
getValue in class AbstractMapEntry<K,V>

setKey

protected K setKey(K newKey)
For use in subclass implementations *only*.


setValue

public V setValue(V newValue)
Description copied from class: AbstractMapEntry
Replaces the value corresponding to this entry with the specified value (optional operation). (Writes through to the map.) The behavior of this call is undefined if the mapping has already been removed from the map (by the iterator's remove() operation).

Specified by:
setValue in interface Map.Entry<K,V>
Overrides:
setValue in class AbstractMapEntry<K,V>
Returns:
old value corresponding to entry.


Copyright © 2012 KnowledgePlaza. All Rights Reserved.