Package net.sf.basedb.util
Class Tree.EntryIterator
- java.lang.Object
-
- net.sf.basedb.util.Tree.EntryIterator
-
- All Implemented Interfaces:
Iterator<Tree.Entry<E>>
private class Tree.EntryIterator extends Object implements Iterator<Tree.Entry<E>>
An iterator that return entries for each node.
-
-
Field Summary
Fields Modifier and Type Field Description 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
Constructors Modifier Constructor Description private
EntryIterator(Tree.Entry<E> root)
Create an iterator that starts at the specified entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
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
-
EntryIterator
private 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.
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNext
in interfaceIterator<Tree.Entry<E>>
-
next
public Tree.Entry<E> next()
- Specified by:
next
in interfaceIterator<Tree.Entry<E>>
-
remove
public void remove()
Not supported.- Specified by:
remove
in interfaceIterator<Tree.Entry<E>>
- Throws:
UnsupportedOperationException
- Always
-
-