|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.mhhe.clrs2e.AdjacencyMatrixGraph.EdgeIterator
Inner class for an iterator that iterates through the edges incident on a given vertex.
Field Summary | |
protected int |
current
The index of the vertex returned by the most recent call to next . |
(package private) int |
u
The index of the vertex whose edges this iterator iterates through. |
Constructor Summary | |
AdjacencyMatrixGraph.EdgeIterator(int u)
Starts an iteration through the edges incident on a given vertex. |
Method Summary | |
boolean |
hasNext()
Returns true if this edge iterator has more
edges, false otherwise. |
java.lang.Object |
next()
Returns the next edge 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 current
next
. Initially, it is -1.
int u
Constructor Detail |
public AdjacencyMatrixGraph.EdgeIterator(int u)
u
- The index of the vertex.Method Detail |
public boolean hasNext()
true
if this edge iterator has more
edges, 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 |