net.sourceforge.combean.graph
Class NodePairEdge

Package class diagram package NodePairEdge
java.lang.Object
  extended by net.sourceforge.combean.graph.NodePairEdge
All Implemented Interfaces:
Edge

public class NodePairEdge
extends Object
implements Edge

An implementation of the Edge interface where each edge is simply represented by two nodes.


Constructor Summary
NodePairEdge(Node firstNode, Node secondNode)
          Construct an edge.
 
Method Summary
 Node getFirstNode()
          Get the first node of the edge.
 Node getSecondNode()
          Get the second node of the edge.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodePairEdge

public NodePairEdge(Node firstNode,
                    Node secondNode)
Construct an edge.

Parameters:
firstNode -
secondNode -
Method Detail

getFirstNode

public final Node getFirstNode()
Get the first node of the edge. For directed edges this is the source. For undirected edges the ordering of the nodes is arbitrary.

Returns:
Returns the firstNode.

getSecondNode

public final Node getSecondNode()
Get the second node of the edge. For directed edges this is the target. For undirected edges the ordering of the nodes is arbitrary.

Returns:
Returns the secondNode.