| Modifier and Type | Field and Description |
|---|---|
static java.util.logging.Logger |
logger
message logger for this class
|
| Constructor and Description |
|---|
IntPair(int a,
int b)
Instantiate a pair.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IntPair otherPair)
Compare to another IntPair, with the smaller elements having priority.
|
boolean |
equals(java.lang.Object otherObject)
Test for exact equivalence with another Object.
|
int |
hashCode()
Generate the hash code for this pair.
|
int |
larger()
Read the larger element of the pair.
|
int |
smaller()
Read the smaller element of the pair.
|
java.lang.String |
toString()
Represent this pair as a text string.
|
public static final java.util.logging.Logger logger
public IntPair(int a,
int b)
a - the first element (≠ b)b - the 2nd element (≠ a)public int larger()
public int smaller()
public int compareTo(IntPair otherPair)
compareTo in interface java.lang.Comparable<IntPair>otherPair - (not null)public boolean equals(java.lang.Object otherObject)
equals in class java.lang.ObjectotherObject - the object to compare (may be null, unaffected)this and otherObject have identical
values, otherwise falsepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object