util
Class KeyValue<K,V>

java.lang.Object
  extended by util.KeyValue<K,V>

public class KeyValue<K,V>
extends Object

Methods that want to return a single key-value pair, like a map.entry.


Field Summary
private  K key
          The key.
private  V value
          The value.
 
Constructor Summary
KeyValue(K k, V v)
          Constructs a new key-value pair.
 
Method Summary
 boolean equals(Object o)
          Equals method like in map.entry.
 K getKey()
          Returns the key.
 V getValue()
          Retruns the associated value.
 int hashCode()
          Hash code like for map entry.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

private K key
The key.


value

private V value
The value.

Constructor Detail

KeyValue

public KeyValue(K k,
                V v)
Constructs a new key-value pair.

Method Detail

getKey

public K getKey()
Returns the key.


getValue

public V getValue()
Retruns the associated value.


hashCode

public int hashCode()
Hash code like for map entry.

Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Equals method like in map.entry.

Overrides:
equals in class Object