org.tm4j.panckoucke.util .AMNodeIterator

Description

Implementation of the Iterator-Interface that returns AMNodes.

You specify the nodes to iterate over by adding arcs to this iterator.

Depending on the value of the mode-property, the Iterator will return either the startnodes or the endnodes or all nodes (start- and endnodes).
In the latter case, the iterator returns at first the startnode of the first arc, continues with the endnodes of the first arc and, proceeds with the startnode of the second arc and so on.

The implementation contains one additional method #nextNode() as a convienience to avoid unnecessary casting.

Inheritance Hierarchy

Interfaces

Field Summary
ALLNODES
ENDNODES
STARTNODES
Method Summary
void addArc(org.tm4j.panckoucke.model.AMArc arc)
Adds an AMArc to the list of arcs that this Iterator iterates over
void hasNext()
java.lang.Object next()
org.tm4j.panckoucke.model.AMNode nextNode()
Returns the next Node as an AMNode-Object
void remove()
void reset()
Resets this Iterator.
After a call to reset, the nextNode-Method may be called size()-times, before a NoSuchElement- Exception is thrown.
void size()
returns the node count.