proj2
Class Coordinates

java.lang.Object
  extended by proj2.Coordinates

public class Coordinates
extends java.lang.Object

Encapsulate the row and column of one cell in a 2-D coordinate system

Class Invariant:
The row and column are nonnegative
Coordinate objects are immutable

Author:
Dennis Frey

Constructor Summary
Coordinates(int row, int column)
          Constructs a new Coordinate from the specified row and column
 
Method Summary
 int getColumn()
          Accessor for the column
 int getRow()
          Accessor for the row
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Coordinates

public Coordinates(int row,
                   int column)
Constructs a new Coordinate from the specified row and column

Parameters:
row - 0-based row number
column - 0-based column number
Method Detail

getRow

public int getRow()
Accessor for the row

Returns:
the row

getColumn

public int getColumn()
Accessor for the column

Returns:
the column