public class TernaryTree.Iterator extends Object implements Enumeration<String>
Modifier and Type | Class and Description |
---|---|
private class |
TernaryTree.Iterator.Item |
Modifier and Type | Field and Description |
---|---|
(package private) int |
cur
current node index
|
(package private) String |
curkey
current key
|
(package private) StringBuffer |
ks
key stack implemented with a StringBuffer
|
(package private) Stack<TernaryTree.Iterator.Item> |
ns
Node stack
|
Constructor and Description |
---|
Iterator() |
Modifier and Type | Method and Description |
---|---|
char |
getValue() |
boolean |
hasMoreElements() |
String |
nextElement() |
void |
rewind() |
private int |
run()
traverse the tree to find next key
|
private int |
up()
traverse upwards
|
int cur
Stack<TernaryTree.Iterator.Item> ns
StringBuffer ks
public Iterator()
public void rewind()
public String nextElement()
nextElement
in interface Enumeration<String>
public char getValue()
public boolean hasMoreElements()
hasMoreElements
in interface Enumeration<String>
private int up()
private int run()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses