Package com.itextpdf.layout.hyphenation
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) int
current node index(package private) String
current key(package private) StringBuffer
key stack implemented with a StringBuffer(package private) Stack
Node stack(package private) TernaryTree
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.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:
nextElement
in interfaceEnumeration
- Returns:
- next element
-
getValue
public char getValue()- Returns:
- value
-
hasMoreElements
public boolean hasMoreElements()- Specified by:
hasMoreElements
in interfaceEnumeration
- Returns:
- true if more elements
-
up
private int up()traverse upwards -
run
private int run()traverse the tree to find next key
-