Package com.itextpdf.layout.hyphenation
Class TernaryTreeIterator
- java.lang.Object
-
- com.itextpdf.layout.hyphenation.TernaryTreeIterator
-
- All Implemented Interfaces:
java.util.Enumeration
class TernaryTreeIterator extends java.lang.Object implements java.util.Enumeration
An object that iterates over theTernaryTree
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
TernaryTreeIterator.Item
-
Field Summary
Fields Modifier and Type Field Description (package private) int
cur
current node index(package private) java.lang.String
curkey
current key(package private) java.lang.StringBuffer
ks
key stack implemented with a StringBuffer(package private) java.util.Stack
ns
Node stack(package private) TernaryTree
tt
-
Constructor Summary
Constructors Constructor Description TernaryTreeIterator(TernaryTree tt)
default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description char
getValue()
boolean
hasMoreElements()
java.lang.Object
nextElement()
void
reset()
Resets the Iterator to its initial state.private int
run()
traverse the tree to find next keyprivate int
up()
traverse upwards
-
-
-
Field Detail
-
cur
int cur
current node index
-
curkey
java.lang.String curkey
current key
-
tt
TernaryTree tt
-
ns
java.util.Stack ns
Node stack
-
ks
java.lang.StringBuffer ks
key stack implemented with a StringBuffer
-
-
Constructor Detail
-
TernaryTreeIterator
public TernaryTreeIterator(TernaryTree tt)
default constructor
-
-
Method Detail
-
reset
public void reset()
Resets the Iterator to its initial state.
-
nextElement
public java.lang.Object nextElement()
- Specified by:
nextElement
in interfacejava.util.Enumeration
- Returns:
- next element
-
getValue
public char getValue()
- Returns:
- value
-
hasMoreElements
public boolean hasMoreElements()
- Specified by:
hasMoreElements
in interfacejava.util.Enumeration
- Returns:
- true if more elements
-
up
private int up()
traverse upwards
-
run
private int run()
traverse the tree to find next key
-
-