org.crosswire.jsword.passage

## Class KeyIterator

- java.lang.Object
- - org.crosswire.jsword.passage.KeyIterator

- All Implemented Interfaces:
    Iterator<Key>

      public class KeyIterator
      extends Object
      implements Iterator<Key>

  This KeyIterator performs a depth first iteration over the subkeys in the key.
  Author:
    DM Smith
  See Also:
    `The GNU Lesser General Public License for details.`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `KeyIterator.Locator` A helper class that remembers where we've been and where we are.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Stack<KeyIterator.Locator>` | `stack`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeyIterator(Key key)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasNext()`
    `Key` | `next()`
    `protected void` | `prepare()`
    `void` | `remove()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### stack

          private Stack<KeyIterator.Locator> stack

  - ### Constructor Detail

    - #### KeyIterator

          public KeyIterator(Key key)

  - ### Method Detail

    - #### prepare

          protected void prepare()

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<Key>`

    - #### next

          public Key next()

      Specified by:
        `next` in interface `Iterator<Key>`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<Key>`