V
- the class type of the vertex.E
- the class type of the edges.public class DepthFirstIterator<V extends Vertex,E extends Edge<V>> extends Object implements Iterator<V>
Modifier and Type | Field and Description |
---|---|
private List<V> |
vertexList |
Constructor and Description |
---|
DepthFirstIterator(Tree<V,E> tree)
Create the iterator over a tree.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
V |
next() |
void |
remove() |
private void |
traverseTree(Tree<V,E> tree)
Perform a depth first traversal through the tree recording, in a linked list, the vertices visited in order.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
Copyright © 2015 University of Glasgow. All rights reserved.