com.arsdigita.util
Interface Graph.Edge

All Known Implementing Classes:
GraphEdge
Enclosing interface:
Graph

public static interface Graph.Edge

An edge is an ordered pair of nodes with a label attached to it. The first node of the pair is called the tail and the second the head.

Implementing classes are expected to supply a constructor of the form Graph.Edge(Object tail, Object head, Object label).


Method Summary
 Object getHead()
          Returns the head node of the edge.
 Object getLabel()
          Returns the label associated with this edge.
 Object getTail()
          Returns the tail node of the edge.
 

Method Detail

getTail

public Object getTail()
Returns the tail node of the edge.

See Also:
getHead()

getHead

public Object getHead()
Returns the head node of the edge.

See Also:
getTail()

getLabel

public Object getLabel()
Returns the label associated with this edge. The label can be anything, depending on your particular graph. For example, if your nodes represent cities and edges represent freeways, then the label can be an Float representing the the distance (the length of the route).



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC