2.17.2: 2011-06-17

net.sf.basedb.util
Class Tree.EntryIterator

java.lang.Object
  extended by net.sf.basedb.util.Tree.EntryIterator
All Implemented Interfaces:
Iterator<Tree.Entry<E>>
Enclosing class:
Tree<E>

private class Tree.EntryIterator
extends Object
implements Iterator<Tree.Entry<E>>

An iterator that return entries for each node.


Field Summary
private  Iterator<Tree.Entry<E>> childIterator
          An iterator over the children of the root entry.
private  Tree.Entry<E> next
          The next element to return.
private  Iterator<Tree.Entry<E>> subTreeIterator
          An iterator over the subtree for each child of the root entry.
 
Constructor Summary
private Tree.EntryIterator(Tree.Entry<E> root)
          Create an iterator that starts at the specified entry.
 
Method Summary
 boolean hasNext()
           
 Tree.Entry<E> next()
           
 void remove()
          Not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

next

private Tree.Entry<E> next
The next element to return.


childIterator

private Iterator<Tree.Entry<E>> childIterator
An iterator over the children of the root entry.


subTreeIterator

private Iterator<Tree.Entry<E>> subTreeIterator
An iterator over the subtree for each child of the root entry.

Constructor Detail

Tree.EntryIterator

private Tree.EntryIterator(Tree.Entry<E> root)
Create an iterator that starts at the specified entry. It will return the specified entry as it's first element. Then it will iterate over the child entries recursively.

Parameters:
root -
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Tree.Entry<E>>

next

public Tree.Entry<E> next()
Specified by:
next in interface Iterator<Tree.Entry<E>>

remove

public void remove()
Not supported.

Specified by:
remove in interface Iterator<Tree.Entry<E>>
Throws:
UnsupportedOperationException - Always

2.17.2: 2011-06-17