java.lang.Object | +--edu.gwu.geometry.IntPair
Class IntPair
is used to store a pair of
integers. There are two public fields i
and
j
for this purpose. To create an instance,
provide the integers to the constructor.
Field Summary | |
int |
i
The first integer of the pair. |
int |
j
The second integer of the pair. |
Constructor Summary | |
IntPair(int i,
int j)
Creates a new IntPair instance, taking in
the first and second integers as parameters. |
Method Summary | |
boolean |
equals(java.lang.Object obj)
Method equals overrides the corresponding
method in Object to test for equality
among two instances. |
java.lang.String |
toString()
Overrides Object 's toString . |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public int i
public int j
Constructor Detail |
public IntPair(int i, int j)
IntPair
instance, taking in
the first and second integers as parameters.i
- an int
valuej
- an int
valueMethod Detail |
public boolean equals(java.lang.Object obj)
equals
overrides the corresponding
method in Object
to test for equality
among two instances.equals
in class java.lang.Object
obj
- an Object
valueboolean
valuepublic java.lang.String toString()
Object
's toString
.toString
in class java.lang.Object
String
value