|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object prefuse.data.util.TreeNodeIterator
public class TreeNodeIterator
A depth-first iterator over the subtree rooted at given node.
Constructor Summary | |
---|---|
TreeNodeIterator(Node root)
Create a new TreeNodeIterator over the given subtree. |
|
TreeNodeIterator(Node root,
boolean preorder)
Create a new TreeNodeIterator over the given subtree. |
Method Summary | |
---|---|
boolean |
hasNext()
|
java.lang.Object |
next()
|
void |
remove()
Throws an UnsupportedOperationException |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeNodeIterator(Node root)
root
- the root of the subtree to traversepublic TreeNodeIterator(Node root, boolean preorder)
root
- the root of the subtree to traversepreorder
- true to use a pre-order traversal, false
for a post-order traversalMethod Detail |
---|
public boolean hasNext()
hasNext
in interface java.util.Iterator
Iterator.hasNext()
public java.lang.Object next()
next
in interface java.util.Iterator
Iterator.next()
public void remove()
remove
in interface java.util.Iterator
Iterator.remove()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |