cs132.dijkstra
Class StringModel

java.lang.Object
  extended by cs132.dijkstra.StringModel
All Implemented Interfaces:
EdgeModel<java.lang.String>

public class StringModel
extends java.lang.Object
implements EdgeModel<java.lang.String>


Constructor Summary
StringModel()
           
 
Method Summary
 void addEdge(java.lang.String from, java.lang.String to, int edgeCost)
           
 int cost(java.lang.String from, java.lang.String to)
          Provide the cost/weight of the edge from the from element to the to element.
 java.util.Collection<? extends java.lang.String> getSuccessors(java.lang.String from)
          Returns a collection of elements to which there is an edge from e.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringModel

public StringModel()
Method Detail

cost

public int cost(java.lang.String from,
                java.lang.String to)
Description copied from interface: EdgeModel
Provide the cost/weight of the edge from the from element to the to element.

Specified by:
cost in interface EdgeModel<java.lang.String>

addEdge

public void addEdge(java.lang.String from,
                    java.lang.String to,
                    int edgeCost)

getSuccessors

public java.util.Collection<? extends java.lang.String> getSuccessors(java.lang.String from)
Description copied from interface: EdgeModel
Returns a collection of elements to which there is an edge from e.

Specified by:
getSuccessors in interface EdgeModel<java.lang.String>


Web Accessibility