public class Tuple<X,Y>
Based on response in http://stackoverflow.com/questions/2670982/using-pairs-or-2-tuples-in-java
public Tuple(X x,
Y y)
Instantiates a tuple object, which just holds 2 values
x - The first objecty - The second objectpublic X getX()
public Y getY()
public int hashCode()
public java.lang.String toString()
public boolean equals(java.lang.Object obj)
public int compareTo(Tuple<X,Y> o)
Using this method (i.e. sorting Tuples) seems to imply both x and y are Comparable. If that's not the case, results are unpredictable.