digraph
Class DiGraph.Edge<V,E>

java.lang.Object
  extended by digraph.DiGraph.Edge<V,E>
All Implemented Interfaces:
Graph.Edge<V,E>
Enclosing class:
DiGraph<V,E>

public static class DiGraph.Edge<V,E>
extends Object
implements Graph.Edge<V,E>

Inner class representing an edge of a directed graph.


Method Summary
 Graph.Vertex<V,E> destination()
          Returns the destination vertex of this edge.
 E getValue()
          Returns the value associated with this edge.
 void setValue(E value)
          Sets the value associated with this edge.
 Graph.Vertex<V,E> source()
          Returns the source vertex of this edge.
 String toString()
          Returns a String representation of the data associated with this edge.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getValue

public E getValue()
Returns the value associated with this edge.

Specified by:
getValue in interface Graph.Edge<V,E>
Returns:
The value associated with this edge.

setValue

public void setValue(E value)
Sets the value associated with this edge.

Specified by:
setValue in interface Graph.Edge<V,E>
Parameters:
value - The new value associated with this edge.

source

public Graph.Vertex<V,E> source()
Returns the source vertex of this edge.

Specified by:
source in interface Graph.Edge<V,E>
Returns:
The source vertex of this edge.

destination

public Graph.Vertex<V,E> destination()
Returns the destination vertex of this edge.

Specified by:
destination in interface Graph.Edge<V,E>
Returns:
The destination vertex of this edge.

toString

public String toString()
Returns a String representation of the data associated with this edge.

Overrides:
toString in class Object
Returns:
A String representation of the data associated with this edge.