weka.core
Class Trie.TrieIterator

java.lang.Object
  extended by weka.core.Trie.TrieIterator
All Implemented Interfaces:
Iterator<String>, RevisionHandler
Enclosing class:
Trie

public static class Trie.TrieIterator
extends Object
implements Iterator<String>, RevisionHandler

Represents an iterator over a trie

Version:
$Revision: 8034 $
Author:
fracpete (fracpete at waikato dot ac dot nz)

Constructor Summary
Trie.TrieIterator(Trie.TrieNode node)
          initializes the iterator
 
Method Summary
 String getRevision()
          Returns the revision string.
 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Trie.TrieIterator

public Trie.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.

Specified by:
hasNext in interface Iterator<String>
Returns:
true if there is at least one more element

next

public String next()
Returns the next element in the iteration.

Specified by:
next in interface Iterator<String>
Returns:
the next element

remove

public void remove()
ignored

Specified by:
remove in interface Iterator<String>

getRevision

public String getRevision()
Returns the revision string.

Specified by:
getRevision in interface RevisionHandler
Returns:
the revision


Copyright © 2012 University of Waikato, Hamilton, NZ. All Rights Reserved.