org.globus.cog.util.graph
Class Edge

java.lang.Object
  extended byorg.globus.cog.util.graph.Edge

public class Edge
extends Object

This class represents an edge in a graph that can wrap arbitrary objects


Constructor Summary
Edge()
          Constructs an Edge object without anything contained
Edge(Object contents)
          Constructs an Edge object and stores the contents inside
 
Method Summary
 boolean equals(Object o)
          Two edges are equal if their endpoints are equal
 Object getContents()
          Gets the object stored on this edge
 Node getFromNode()
          Gets the source node for this edge
 Node getToNode()
          Gets the destination node for this edge
 int hashCode()
           
 void setContents(Object Contents)
          Sets the object contained by this edge
 void setNodes(Node From, Node To)
          Sets the from and to nodes for this edge
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Edge

public Edge()
Constructs an Edge object without anything contained


Edge

public Edge(Object contents)
Constructs an Edge object and stores the contents inside

Parameters:
contents - the object to be stored "into" the edge
Method Detail

setContents

public void setContents(Object Contents)
Sets the object contained by this edge

Parameters:
Contents - The object to be stored

getContents

public Object getContents()
Gets the object stored on this edge

Returns:
The object stored in this edge

setNodes

public void setNodes(Node From,
                     Node To)
Sets the from and to nodes for this edge

Parameters:
From - The node this edge starts from
To - The node this edge goes to

getFromNode

public Node getFromNode()
Gets the source node for this edge

Returns:
The fromNode value

getToNode

public Node getToNode()
Gets the destination node for this edge

Returns:
The toNode value

hashCode

public int hashCode()

equals

public boolean equals(Object o)
Two edges are equal if their endpoints are equal