util.graph
Class Path
java.lang.Object
|
+--util.graph.Path
- All Implemented Interfaces:
- Cloneable, Comparable
- Direct Known Subclasses:
- SignalPath
- public class Path
- extends Object
- implements Comparable, Cloneable
A path of edges.
Maintains cost based on all edges of a given
owner only contribute one cost, not one for each edge.
edges
protected Vector edges
cost
protected int cost
clone
public Object clone()
- Clone. Does not copy edges. (Shallow copy)
- Overrides:
clone
in class Object
getCost
public int getCost()
- Cost of the path.
getStart
public Object getStart()
- Where the path starts.
getEndpoint
public Object getEndpoint()
- What the path leads to.
getEdges
public Iterator getEdges()
compareTo
public int compareTo(Object o)
- Specified by:
compareTo
in interface Comparable
toString
public String toString()
- Overrides:
toString
in class Object
printOut
public void printOut()