Class TernaryTreeIterator
java.lang.Object
com.itextpdf.layout.hyphenation.TernaryTreeIterator
- All Implemented Interfaces:
Enumeration
An object that iterates over the
TernaryTree.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) intcurrent node index(package private) Stringcurrent key(package private) StringBufferkey stack implemented with a StringBuffer(package private) StackNode stack(package private) TernaryTree -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Enumeration
asIterator
-
Field Details
-
cur
int curcurrent node index -
curkey
String curkeycurrent key -
tt
TernaryTree tt -
ns
Stack nsNode stack -
ks
StringBuffer kskey stack implemented with a StringBuffer
-
-
Constructor Details
-
TernaryTreeIterator
default constructor
-
-
Method Details
-
reset
public void reset()Resets the Iterator to its initial state. -
nextElement
- Specified by:
nextElementin interfaceEnumeration- Returns:
- next element
-
getValue
public char getValue()- Returns:
- value
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElementsin interfaceEnumeration- Returns:
- true if more elements
-
up
private int up()traverse upwards -
run
private int run()traverse the tree to find next key
-