org.springframework.shell.support.util
Class Pair<K,V>

java.lang.Object
  extended by org.springframework.shell.support.util.Pair<K,V>
Type Parameters:
K - the key type
V - the value type
Direct Known Subclasses:
WebXmlUtils.WebXmlParam

public class Pair<K,V>
extends Object

A pair with a key of type "K" and a value of type "V". Instances are immutable.

Since:
1.2.0

Constructor Summary
Pair(K key, V value)
          Constructor
 
Method Summary
 boolean equals(Object obj)
           
 K getKey()
          Returns the key
 V getValue()
          Returns the value
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(K key,
            V value)
Constructor

Parameters:
key - can be null
value - can be null
Method Detail

getKey

public K getKey()
Returns the key

Returns:
null if it is

getValue

public V getValue()
Returns the value

Returns:
null if it is

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object