Class DepthFirstPreorderIterator
- java.lang.Object
-
- com.ensoftcorp.open.commons.algorithms.dominance.DepthFirstPreorderIterator
-
- All Implemented Interfaces:
java.util.Iterator<com.ensoftcorp.atlas.core.db.graph.Node>
- Direct Known Subclasses:
InvertedDepthFirstPreorderIterator
public class DepthFirstPreorderIterator extends java.lang.Object implements java.util.Iterator<com.ensoftcorp.atlas.core.db.graph.Node>
DepthFirstPreorderIterator yields a depth-first pre-order traversal of a graph.
-
-
Constructor Summary
Constructors Constructor Description DepthFirstPreorderIterator(UniqueEntryExitGraph graph, com.ensoftcorp.atlas.core.db.graph.Node root)
DepthFirstPreorderIterator(UniqueEntryExitGraph graph, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> roots)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
com.ensoftcorp.atlas.core.db.graph.Node
next()
void
remove()
-
-
-
Constructor Detail
-
DepthFirstPreorderIterator
public DepthFirstPreorderIterator(UniqueEntryExitGraph graph, com.ensoftcorp.atlas.core.db.set.AtlasSet<com.ensoftcorp.atlas.core.db.graph.Node> roots)
- Parameters:
roots
- the caller's root(s) of the flowgraph. There should be only one start block, but multiple roots are tolerated to work around fuzzy successor logic to exception handlers.
-
DepthFirstPreorderIterator
public DepthFirstPreorderIterator(UniqueEntryExitGraph graph, com.ensoftcorp.atlas.core.db.graph.Node root)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<com.ensoftcorp.atlas.core.db.graph.Node>
-
next
public com.ensoftcorp.atlas.core.db.graph.Node next()
- Specified by:
next
in interfacejava.util.Iterator<com.ensoftcorp.atlas.core.db.graph.Node>
-
remove
public void remove()
- Specified by:
remove
in interfacejava.util.Iterator<com.ensoftcorp.atlas.core.db.graph.Node>
-
-