Class 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 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 interface java.util.Iterator<com.ensoftcorp.atlas.core.db.graph.Node>
      • next

        public com.ensoftcorp.atlas.core.db.graph.Node next()
        Specified by:
        next in interface java.util.Iterator<com.ensoftcorp.atlas.core.db.graph.Node>
      • remove

        public void remove()
        Specified by:
        remove in interface java.util.Iterator<com.ensoftcorp.atlas.core.db.graph.Node>