Class CtBFSIterator

    • Constructor Detail

      • CtBFSIterator

        public CtBFSIterator​(CtElement root)
        CtIterator constructor, prepares the iterator from the @root node
        Parameters:
        root - the initial node to expand
    • Method Detail

      • scan

        public void scan​(CtElement element)
        prevent scanner from going down the tree, instead save with other CtElement children of the current node
        Overrides:
        scan in class CtScanner
        Parameters:
        element - the next direct child of the current node being expanded
      • next

        public CtElement next()
        Dereference the "iterator"
        Specified by:
        next in interface Iterator<CtElement>
        Returns:
        CtElement the next element in BFS order without going down the tree