|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object proj2.Coordinates
public class Coordinates
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
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 |
---|
public Coordinates(int row, int column)
row
- 0-based row numbercolumn
- 0-based column numberMethod Detail |
---|
public int getRow()
public int getColumn()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |