|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.util.Pair<A,B>
public class Pair<A extends java.lang.Comparable<A>,B extends java.lang.Comparable<B>>
This is a generic pair class, where the first and second coordinate classes are specified using template arguments.
Field Summary | |
---|---|
A |
first
First component |
B |
second
Second component |
Constructor Summary | |
---|---|
Pair()
Creates a pair with first and second coordinates set to null . |
Method Summary | ||
---|---|---|
int |
compareTo(Pair<A,B> pair)
The comparison of triples is according to lexicographical order. |
|
Pair<A,B> |
copy()
|
|
boolean |
equals(java.lang.Object obj)
Two pairs are equal if their respective components are equal. |
|
int |
hashCode()
|
|
static
|
makePair(A a,
B b)
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public A extends java.lang.Comparable<A> first
public B extends java.lang.Comparable<B> second
Constructor Detail |
---|
public Pair()
null
.
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int compareTo(Pair<A,B> pair)
compareTo
in interface java.lang.Comparable<Pair<A extends java.lang.Comparable<A>,B extends java.lang.Comparable<B>>>
public Pair<A,B> copy()
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static <A extends java.lang.Comparable<A>,B extends java.lang.Comparable<B>> Pair<A,B> makePair(A a, B b)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |