Util
Class Pair<K extends java.lang.Comparable,V>
java.lang.Object
Util.Pair<K,V>
- Type Parameters:
K - V -
- All Implemented Interfaces:
- java.lang.Comparable<Pair>
public class Pair<K extends java.lang.Comparable,V>
- extends java.lang.Object
- implements java.lang.Comparable<Pair>
Used multiple times when sorting elements by a specific property/function
of those elements
- Author:
- davidc
- See Also:
PairSorter
|
Constructor Summary |
Pair(K key,
V value)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Pair
public Pair(K key,
V value)
compareTo
public int compareTo(Pair arg0)
- Specified by:
compareTo in interface java.lang.Comparable<Pair>
getKey
public K getKey()
setKey
public void setKey(K key)
getValue
public V getValue()
setValue
public void setValue(V value)