maze.geometry
Class GeoDirectionIterator

java.lang.Object
  extended bymaze.geometry.GeoDirectionIterator

public class GeoDirectionIterator
extends java.lang.Object

Iterates through the cardinal directions of this geometry. For a simple rectangluar geometry these are the positive and negative horizontal directions and the positive and negative vertical directions. These directions are ordered clockwise.


Constructor Summary
GeoDirectionIterator(int m)
          Constructs a new direction iterator for a given number of directions.
 
Method Summary
 boolean hasMoreDirections()
          Returns true if this iterator has more directions.
 int nextDirection()
          Returns the next direction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeoDirectionIterator

public GeoDirectionIterator(int m)
Constructs a new direction iterator for a given number of directions.

Parameters:
m - int maximum number of directions.
Method Detail

hasMoreDirections

public boolean hasMoreDirections()
Returns true if this iterator has more directions.

Returns:
boolean true if this iterator has more directions.

nextDirection

public int nextDirection()
Returns the next direction.

Returns:
int next direction.