org.crosswire.jsword.passage
Class KeyIterator

java.lang.Object
  extended by 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
static class KeyIterator.Locator
          A helper class that remembers where we've been and where we are.
 
Field Summary
private  Stack<KeyIterator.Locator> stack
           
 
Constructor Summary
KeyIterator(Key key)
           
 
Method Summary
 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>

Copyright ยจ 2003-2015