edu.gwu.geometry
Class IntPair

java.lang.Object
  |
  +--edu.gwu.geometry.IntPair

public class IntPair
extends java.lang.Object

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

i

public int i
The first integer of the pair.

j

public int j
The second integer of the pair.
Constructor Detail

IntPair

public IntPair(int i,
               int j)
Creates a new IntPair instance, taking in the first and second integers as parameters.
Parameters:
i - an int value
j - an int value
Method Detail

equals

public boolean equals(java.lang.Object obj)
Method equals overrides the corresponding method in Object to test for equality among two instances.
Overrides:
equals in class java.lang.Object
Parameters:
obj - an Object value
Returns:
a boolean value

toString

public java.lang.String toString()
Overrides Object's toString.
Overrides:
toString in class java.lang.Object
Returns:
a String value