weka.core

## Class Trie.TrieIterator

- java.lang.Object
- - weka.core.Trie.TrieIterator

- All Implemented Interfaces:
    java.util.Iterator<java.lang.String>, RevisionHandler
  Enclosing class:
    Trie

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

  Represents an iterator over a trie
  Version:
    $Revision: 10203 $
  Author:
    fracpete (fracpete at waikato dot ac dot nz)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TrieIterator(Trie.TrieNode node)` initializes the iterator

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `getRevision()` Returns the revision string.
    `boolean` | `hasNext()` Returns true if the iteration has more elements.
    `java.lang.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`

    - ### Methods inherited from interface java.util.Iterator

      `forEachRemaining`

- - ### 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.
      Specified by:
        `hasNext` in interface `java.util.Iterator<java.lang.String>`
      Returns:
        true if there is at least one more element

    - #### next

          public java.lang.String next()

      Returns the next element in the iteration.
      Specified by:
        `next` in interface `java.util.Iterator<java.lang.String>`
      Returns:
        the next element

    - #### remove

          public void remove()

      ignored
      Specified by:
        `remove` in interface `java.util.Iterator<java.lang.String>`

    - #### getRevision

          public java.lang.String getRevision()

      Returns the revision string.
      Specified by:
        `getRevision` in interface `RevisionHandler`
      Returns:
        the revision