Class Tree.TreeIterator<T>

java.lang.Object
fr.formiko.usuel.structures.Tree.TreeIterator<T>
All Implemented Interfaces:
Serializable, Iterator<T>
Enclosing class:
Tree<T>

class Tree.TreeIterator<T> extends Object implements Iterator<T>, Serializable
Iterator of the Tree
Author:
Hydrolien
  • Field Details

  • Constructor Details

    • TreeIterator

      public TreeIterator(Tree<T> tree)
      Initialize pointer to head of the list for iteration.
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • next

      public T next()
      Return current content and update pointer.
      It save Children in a heap to be sur to check every TreeNode.
      Specified by:
      next in interface Iterator<T>