Package picard.sam.util
Class Pair<X extends Comparable<X>,Y extends Comparable<Y>>
- java.lang.Object
-
- picard.sam.util.Pair<X,Y>
-
- All Implemented Interfaces:
Comparable<Pair<X,Y>>
public class Pair<X extends Comparable<X>,Y extends Comparable<Y>> extends Object implements Comparable<Pair<X,Y>>
Simple Pair class. reimplemented since the commons one is final, and I wanted a different toString function...
-
-
Method Detail
-
getLeft
public X getLeft()
-
getRight
public Y getRight()
-
equals
public boolean equals(Object o)
Calculate whether this pair object is equal to another object.
-
hashCode
public int hashCode()
Basic hashcode function. Assume hashcodes of left and right are randomly distributed and return the XOR of the two.
-
compareTo
public int compareTo(Pair<X,Y> o)
- Specified by:
compareTo
in interfaceComparable<X extends Comparable<X>>
-
-