|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
Inner class for an iterator that iterates through the edges incident on a given vertex.
| Field Summary | |
protected AdjacencyListGraph.Edge |
current
The edge returned by the most recent call to next. |
protected int |
index
The index of the vertex whose edges this iterator iterates through. |
| Constructor Summary | |
AdjacencyListGraph.EdgeIterator(int v)
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 AdjacencyListGraph.Edge current
next. Initially, it is null.
protected int index
| Constructor Detail |
public AdjacencyListGraph.EdgeIterator(int v)
v - 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.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorpublic void remove()
remove in interface java.util.Iteratorjava.lang.UnsupportedOperationException - always.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||