|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gshute.util.Pair
A gshute.util.Pair is an object with two member objects.
Field Summary | |
protected java.lang.Object |
first
first is the first member of this pair. |
protected java.lang.Object |
second
second is the second member of this pair. |
Constructor Summary | |
Pair(java.lang.Object m1,
java.lang.Object m2)
Pair(m1, m2) returns a Pair whose first member is m1 and whose second member is m2. |
Method Summary | |
boolean |
equals(java.lang.Object q)
p.equals(Object q) returns true if q is a Pair and the first members of p and q are equal and the second members of p and q are equal. |
java.lang.Object |
getFirst()
p.getFirst() returns the first member of p. |
static java.util.Comparator |
getFirstComparator(java.util.Comparator cmp)
Pair.getFirstComparator(cmp) returns an comparator that compares pairs by applying cmp to the first members. |
static java.util.Comparator |
getLexComparator(java.util.Comparator cmp1,
java.util.Comparator cmp2)
Pair.getLexComparator(cmp1, cmp2) returns an comparator that compares pairs by applying cmp1 to the first members and using cmp2 on the second members if the first members are equal. |
java.lang.Object |
getSecond()
p.getSecond() returns the second member of p. |
static java.util.Comparator |
getSecondComparator(java.util.Comparator cmp)
Pair.getSecondComparator(cmp) returns an comparator that compares pairs by applying cmp to the second members. |
void |
setFirst(java.lang.Object dat)
p.setFirst(dat) sets the first member of p to dat. |
void |
setSecond(java.lang.Object dat)
p.setSecond(dat) sets the second member of p to dat. |
java.lang.String |
toString()
p.toString() returns a String describing p. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
protected java.lang.Object first
protected java.lang.Object second
Constructor Detail |
public Pair(java.lang.Object m1, java.lang.Object m2)
Method Detail |
public java.lang.Object getFirst()
public java.lang.Object getSecond()
public void setFirst(java.lang.Object dat)
public void setSecond(java.lang.Object dat)
public java.lang.String toString()
public boolean equals(java.lang.Object q)
public static java.util.Comparator getFirstComparator(java.util.Comparator cmp)
public static java.util.Comparator getSecondComparator(java.util.Comparator cmp)
public static java.util.Comparator getLexComparator(java.util.Comparator cmp1, java.util.Comparator cmp2)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |