|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mhhe.clrs2e.AdjacencyMatrixGraph.VertexIterator
Inner class for a vertex iterator.
Field Summary | |
protected int |
lastVisited
The index of the vertex returned by the most recent call to next . |
Constructor Summary | |
AdjacencyMatrixGraph.VertexIterator()
Starts an iteration through the vertices. |
Method Summary | |
boolean |
hasNext()
Returns true if this vertex iterator has more
vertices, false otherwise. |
java.lang.Object |
next()
Returns the next vertex in the iteration. |
void |
remove()
Unsupported. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected int lastVisited
next
. Initially, it is -1.
Constructor Detail |
public AdjacencyMatrixGraph.VertexIterator()
Method Detail |
public boolean hasNext()
true
if this vertex iterator has more
vertices, false
otherwise.
hasNext
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
public void remove()
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
- always.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |