|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.kzoo.grid.Grid.BoundedGridValidityChecker
A BoundedGridValidityChecker
implements a strategy for
determining the validity of a location in a bounded grid.
Constructor Summary | |
Grid.BoundedGridValidityChecker(int rows,
int cols)
Constructs a BoundedGridValidityChecker object. |
Method Summary | |
boolean |
isValid(Location loc)
Verifies whether a location is valid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Grid.BoundedGridValidityChecker(int rows, int cols)
BoundedGridValidityChecker
object.
(Precondition: rows > 0
and cols > 0
.)
rows
- number of rows in the gridcols
- number of columns in the gridMethod Detail |
public boolean isValid(Location loc)
isValid
in interface Grid.ValidityChecker
loc
- location to check
true
if loc
is valid;
false
otherwise
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |