Util
Class Pair<K extends java.lang.Comparable,V>

java.lang.Object
  extended by 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)
           
 
Method Summary
 int compareTo(Pair arg0)
           
 K getKey()
           
 V getValue()
           
 void setKey(K key)
           
 void setValue(V value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pair

public Pair(K key,
            V value)
Method Detail

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)