org.xmloperator.lambda.net.util
Class NetTraversal

java.lang.Object
  |
  +--org.xmloperator.lambda.net.util.NetTraversal
All Implemented Interfaces:
OperatorIterator

public class NetTraversal
extends java.lang.Object
implements OperatorIterator

This is an iterator on the Operators belonging to a lambda-net.

The mark of each Operator is changed during traversal.

The net is supposed to be invariant (no interaction) during traversal.

The first Operator given by the next() method is the root Eraser.

Before traversing a net, its Operators must have the same mark.


Constructor Summary
NetTraversal(Eraser rootEraser)
           
NetTraversal(Eraser rootEraser, boolean isMarkIncremented)
           
 
Method Summary
 boolean hasNext()
          Returns true if there is yet one or more Operator(s) to read.
 Operator next()
          Returns the next Operator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetTraversal

public NetTraversal(Eraser rootEraser)

NetTraversal

public NetTraversal(Eraser rootEraser,
                    boolean isMarkIncremented)
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: OperatorIterator
Returns true if there is yet one or more Operator(s) to read.

Specified by:
hasNext in interface OperatorIterator
Returns:
true if there is yet one or more Operator(s) to read.

next

public Operator next()
Description copied from interface: OperatorIterator
Returns the next Operator.

Specified by:
next in interface OperatorIterator
Returns:
the next Operator.