edu.byu.ece.graph
Class BasicEdge

java.lang.Object
  extended by edu.byu.ece.graph.BasicEdge
All Implemented Interfaces:
Edge, java.io.Serializable
Direct Known Subclasses:
SourceEPREdge

public class BasicEdge
extends java.lang.Object
implements Edge

The most basic implementation of Edge. This class allows simple on-the-fly graphs to be created.

Author:
nhr2
See Also:
Serialized Form

Field Summary
(package private)  java.lang.Object _sink
          The edge's sink node.
(package private)  java.lang.Object _src
          The edge's source node.
 
Constructor Summary
BasicEdge(java.lang.Object src, java.lang.Object sink)
          Main Constructor.
 
Method Summary
 java.lang.Object getSink()
          Return the sink object of a mathematical edge.
 java.lang.Object getSource()
          Return the source object of a mathematical edge.
 Edge invert()
          Return a new edge object that is the inverse of this object.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_src

java.lang.Object _src
The edge's source node.


_sink

java.lang.Object _sink
The edge's sink node.

Constructor Detail

BasicEdge

public BasicEdge(java.lang.Object src,
                 java.lang.Object sink)
Main Constructor.

Parameters:
src - - the source of the edge
sink - - the sink of the edge
Method Detail

getSource

public java.lang.Object getSource()
Description copied from interface: Edge
Return the source object of a mathematical edge.

Specified by:
getSource in interface Edge
Returns:
- the edge's source node

getSink

public java.lang.Object getSink()
Description copied from interface: Edge
Return the sink object of a mathematical edge.

Specified by:
getSink in interface Edge
Returns:
- the edge's sink node

invert

public Edge invert()
Description copied from interface: Edge
Return a new edge object that is the inverse of this object. The resulting Edge will swap the source and sink objects.

Specified by:
invert in interface Edge
Returns:
- the inverted form of this edge

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object