edu.unh.sdb.common
Interface SDBIterator

All Known Subinterfaces:
ObliquePlaneIteratorInterface
All Known Implementing Classes:
BDISBoundsIterator, CellBoundsIterator, DCBoundsIterator, DCIterator, DSPartitionedStencilIterator, DSThreadedPartitionedStencilIterator, GBoundsGapIterator, GBoundsIterator, ISBoundsIterator, ISIterator, ObliquePlaneIterator, RayCastingIterator, RayIterator, RayIteratorStep, SliceIterator

public interface SDBIterator

The SDBIterator interface is a simple interface designed for efficient implementation. There is no hasNext() method, as this method can be inefficient for the kinds of iterations used in the SDB system. The valid() method provides similar functionality slightly different semantics. Usage example: for(iter.init(); iter.valid(); iter.next()){ System.out.println(iter); }


Method Summary
 void end()
          Advance the iterator to the last valid value in the iteration.
 void init()
          Perform any necessary initialization, and set the iterator value to the first value in the iteration.
 boolean next()
          Advance the iterator by one step.
 boolean valid()
          Return true if the iterator currently has a valid value, false otherwise.
 

Method Detail

init

void init()
Perform any necessary initialization, and set the iterator value to the first value in the iteration.


next

boolean next()
Advance the iterator by one step. If the iterator cannot be advanced to produce a valid value, the value of the iterator is undefined, but the next() method will return false, as will a subsequent call to valid().


valid

boolean valid()
Return true if the iterator currently has a valid value, false otherwise.


end

void end()
Advance the iterator to the last valid value in the iteration. (optional operation)