com.mhhe.clrs2e
Class WeightedAdjacencyListGraph.EdgeIterator

java.lang.Object
  |
  +--com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
        |
        +--com.mhhe.clrs2e.WeightedAdjacencyListGraph.EdgeIterator
All Implemented Interfaces:
java.util.Iterator, WeightedEdgeIterator
Enclosing class:
WeightedAdjacencyListGraph

public class WeightedAdjacencyListGraph.EdgeIterator
extends AdjacencyListGraph.EdgeIterator
implements WeightedEdgeIterator

Inner class that overrides AdjacencyListGraph.EdgeIterator to implement WeightedEdgeIterator.


Field Summary
 
Fields inherited from class com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
current, index
 
Constructor Summary
WeightedAdjacencyListGraph.EdgeIterator(int v)
          Starts an iteration through the weighted edges incident on a given vertex.
 
Method Summary
 double getWeight()
          Returns the weight of the edge returned by the most recent call to next.
 void setWeight(double weight)
          Sets the weight of the edge returned by the most recent call to next.
 
Methods inherited from class com.mhhe.clrs2e.AdjacencyListGraph.EdgeIterator
hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Iterator
hasNext, next, remove
 

Constructor Detail

WeightedAdjacencyListGraph.EdgeIterator

public WeightedAdjacencyListGraph.EdgeIterator(int v)
Starts an iteration through the weighted edges incident on a given vertex.

Parameters:
v - The index of the vertex.
Method Detail

getWeight

public double getWeight()
Returns the weight of the edge returned by the most recent call to next.

Specified by:
getWeight in interface WeightedEdgeIterator

setWeight

public void setWeight(double weight)
Sets the weight of the edge returned by the most recent call to next.

Specified by:
setWeight in interface WeightedEdgeIterator