Class DepthFirstTreeIterator

  • All Implemented Interfaces:
    kotlin.collections.Iterator

    
    public final class DepthFirstTreeIterator<T extends Object>
     implements Iterator<T>
                        

    Walks the child tree, depth-first: first the node, then its descendants, then its next sibling.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Boolean hasNext()
      T next()
      • Methods inherited from class kotlin.collections.Iterator

        forEachRemaining
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DepthFirstTreeIterator

        DepthFirstTreeIterator(T root, Function1<T, List<T>> children)
        Parameters:
        root - start here.
        children - fetches children of given node.