Class TernaryTreeIterator

java.lang.Object
com.itextpdf.layout.hyphenation.TernaryTreeIterator
All Implemented Interfaces:
Enumeration

class TernaryTreeIterator extends Object implements Enumeration
An object that iterates over the TernaryTree.
  • Field Details

    • cur

      int cur
      current node index
    • curkey

      String curkey
      current key
    • tt

    • ns

      Stack ns
      Node stack
    • ks

      key stack implemented with a StringBuffer
  • Constructor Details

    • TernaryTreeIterator

      public TernaryTreeIterator(TernaryTree tt)
      default constructor
  • Method Details

    • reset

      public void reset()
      Resets the Iterator to its initial state.
    • nextElement

      public Object nextElement()
      Specified by:
      nextElement in interface Enumeration
      Returns:
      next element
    • getValue

      public char getValue()
      Returns:
      value
    • hasMoreElements

      public boolean hasMoreElements()
      Specified by:
      hasMoreElements in interface Enumeration
      Returns:
      true if more elements
    • up

      private int up()
      traverse upwards
    • run

      private int run()
      traverse the tree to find next key