|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.moyoman.util.IntPair
This class provides an easy way of relating two integers. The objects are stored and retrieved in order, but two objects of type IntPair are considered to be equal if the two integers are equal regardless of their order.
| Field Summary | |
private int |
val1
The first integer. |
private int |
val2
The second integer. |
| Constructor Summary | |
IntPair(int i1,
int i2)
Create a new IntPair object. |
|
| Method Summary | |
Object |
clone()
Override the Object.clone() method. |
boolean |
equals(Object o)
Override the default equals() method. |
int |
getI1()
Return the first integer. |
int |
getI2()
Return the second integer. |
int |
hashCode()
Override the default hashCode() method. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int val1
private int val2
| Constructor Detail |
public IntPair(int i1,
int i2)
i1 - The first integer in the pair.i2 - The second integer in the pair.| Method Detail |
public int getI1()
public int getI2()
public boolean equals(Object o)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic Object clone()
clone in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||