goldman.graph
Class SimpleEdge<V>
java.lang.Object
goldman.graph.SimpleEdge<V>
- All Implemented Interfaces:
- Edge<V>
- Direct Known Subclasses:
- SimpleWeightedEdge
public class SimpleEdge<V>
- extends Object
- implements Edge<V>
The SimpleEdge class provides a sample implementation for an edge.
Method Summary |
V |
dest()
Returns the destination (head) of this edge. |
V |
source()
Returns the source (tail) of this edge. |
String |
toString()
|
SimpleEdge
public SimpleEdge(V head,
V tail)
source
public V source()
- Description copied from interface:
Edge
- Returns the source (tail) of this edge.
- Specified by:
source
in interface Edge<V>
dest
public V dest()
- Description copied from interface:
Edge
- Returns the destination (head) of this edge.
- Specified by:
dest
in interface Edge<V>
toString
public String toString()
- Overrides:
toString
in class Object