Class Pair

java.lang.Object
  |
  +--Pair

class Pair
extends java.lang.Object

A Pair maintains a pair of int's, row and col. These are publicly accessible.


Field Summary
 int col
           
 int row
           
 
Constructor Summary
(package private) Pair(int row, int col)
          Create a Pair from row and Column.
 
Method Summary
 boolean adjacent(Pair other)
          Indicate whether this Pair is adjacent on the Grid to the argument Pair.
 boolean equals(Pair other)
          Equality test for Pairs.
 java.lang.String toString()
          Provide a String representation of this Pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

row

public int row

col

public int col
Constructor Detail

Pair

Pair(int row,
     int col)
Create a Pair from row and Column.

Method Detail

adjacent

public boolean adjacent(Pair other)
Indicate whether this Pair is adjacent on the Grid to the argument Pair.


equals

public boolean equals(Pair other)
Equality test for Pairs.


toString

public java.lang.String toString()
Provide a String representation of this Pair.

Overrides:
toString in class java.lang.Object