Class RowMajorEnvIterator

java.lang.Object
  |
  +--EnvIterator
        |
        +--RowMajorEnvIterator
All Implemented Interfaces:
java.util.Iterator

public class RowMajorEnvIterator
extends EnvIterator

Environment-Based Applications:
A RowMajorEnvIterator object provides an iterator that steps through the locations of a BoundedEnv object in row-major order. It iterates through the locations and processes the rows of the environment, from 0 to R - 1, where R is the number of rows in the environment. As part of processing each row, it traverses through the columns of that row, from 0 to C - 1, where C is the number of columns in the environment.

See Also:
Environment, Location

Constructor Summary
RowMajorEnvIterator(BoundedEnv environment)
          Constructs an iterator object that steps through an environment.
 
Method Summary
protected  Location findNextLocation()
          Helper Method: Finds next location for iterator.
 
Methods inherited from class EnvIterator
environment, hasNext, next, nextLocation, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowMajorEnvIterator

public RowMajorEnvIterator(BoundedEnv environment)
Constructs an iterator object that steps through an environment.
Parameters:
environment - environment to iterate through
Method Detail

findNextLocation

protected Location findNextLocation()
Helper Method: Finds next location for iterator.
Overrides:
findNextLocation in class EnvIterator