goldman.graph
Class SimpleEdge<V>

java.lang.Object
  extended by 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.


Constructor Summary
SimpleEdge(V head, V tail)
           
 
Method Summary
 V dest()
          Returns the destination (head) of this edge.
 V source()
          Returns the source (tail) of this edge.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleEdge

public SimpleEdge(V head,
                  V tail)
Method Detail

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