|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.util.BreadthFirstTreeIterator
public class BreadthFirstTreeIterator
Provides an iterator through all the children of tree including tree itself. This is an iterator over the tree elements, not the contents of the tree elements. You have to call getContents() over each element to get contents, or use the conveninece method.
| Constructor Summary | |
|---|---|
BreadthFirstTreeIterator(Tree tree)
Create an Iterator from a tree. |
|
| Method Summary | |
|---|---|
java.util.Iterator |
getContentsIterator()
DOCUMENT ME! |
Tree |
getTree()
DOCUMENT ME! |
boolean |
hasNext()
Tests if this Iterator contains more elements. |
java.lang.Object |
next()
Returns the next element of this Iterator if this Iterator object has at least one more element to provide. |
void |
remove()
Removes from the underlying collection the last element returned by the iterator (optional operation). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BreadthFirstTreeIterator(Tree tree)
tree - of objects on which to enumerate.| Method Detail |
|---|
public boolean hasNext()
hasNext in interface java.util.Iterator
public java.lang.Object next()
throws java.util.NoSuchElementException
next in interface java.util.Iteratorjava.util.NoSuchElementException - if no more elements exist.public void remove()
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException - if the remove operation
is not supported by this Iterator.public java.util.Iterator getContentsIterator()
public Tree getTree()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||