Package org.onlab.graph
Class DefaultPath<V extends Vertex,E extends Edge<V>>
- java.lang.Object
-
- org.onlab.graph.DefaultPath<V,E>
-
-
Constructor Summary
Constructors Constructor Description DefaultPath(List<E> edges, Weight cost)
Creates a new path from the specified list of edges and cost.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Weight
cost()
Returns the total cost of the path as a weight object.V
dst()
Returns the edge destination vertex.List<E>
edges()
Returns the list of edges comprising the path.boolean
equals(Object obj)
int
hashCode()
V
src()
Returns the edge source vertex.String
toString()
-
-
-
Method Detail
-
cost
public Weight cost()
Description copied from interface:Path
Returns the total cost of the path as a weight object.
-
edges
public List<E> edges()
Description copied from interface:Path
Returns the list of edges comprising the path. Adjacent edges will share the same vertex, meaning that a source of one edge, will be the same as the destination of the prior edge.
-
-