Package adams.core
Class Trie.TrieIterator
- java.lang.Object
-
- adams.core.Trie.TrieIterator
-
-
Field Summary
Fields Modifier and Type Field Description protected Trie.TrieNode
m_CurrentLeaf
the current leaf nodeprotected Trie.TrieNode
m_LastLeaf
the last leaf for this root nodeprotected Trie.TrieNode
m_Root
the node to use as root
-
Constructor Summary
Constructors Constructor Description TrieIterator(Trie.TrieNode node)
initializes the iterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Returns true if the iteration has more elements.String
next()
Returns the next element in the iteration.void
remove()
ignored-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
m_Root
protected Trie.TrieNode m_Root
the node to use as root
-
m_LastLeaf
protected Trie.TrieNode m_LastLeaf
the last leaf for this root node
-
m_CurrentLeaf
protected Trie.TrieNode m_CurrentLeaf
the current leaf node
-
-
Constructor Detail
-
TrieIterator
public TrieIterator(Trie.TrieNode node)
initializes the iterator- Parameters:
node
- the node to use as root
-
-
Method Detail
-
hasNext
public boolean hasNext()
Returns true if the iteration has more elements.
-
next
public String next()
Returns the next element in the iteration.
-
-