exe
Class Edge

java.lang.Object
  extended by exe.VisEdge
      extended by exe.Edge

public class Edge
extends VisEdge

This class maintains the information for a single edge in the Tree data structure. An Edge object inherits from the VisEdge class and adds additional data members and methods to allow these edges to be used in binary and general trees.

In order to use any of these tree classes in a script-producing program, the script-producing program must import the package exe.

Author:
Sven Moen (original author), Ethan Dereszynski (adaptations), Ben Tidman (GAIGS adaptations), Andrew Jungwirth (more GAIGS adaptations and Javadoc comments)

Constructor Summary
Edge()
          Constructs an Edge with default values.
Edge(TreeNode s, TreeNode e)
          Constructs an Edge by specifying the TreeNode from which it begins and the TreeNode at which it ends.
 
Method Summary
 TreeNode getEnd()
          Accesses the ending TreeNode for this Edge.
 TreeNode getStart()
          Accesses the starting TreeNode for this Edge.
 void setEnd(TreeNode e)
          Assigns the ending TreeNode for this Edge.
 void setStart(TreeNode s)
          Assigns the starting TreeNode for this Edge.
 
Methods inherited from class exe.VisEdge
activate, clearEdge, deactivate, getEX, getEY, getHexColor, getSX, getSY, getWeight, isActivated, setEX, setEY, setHexColor, setSX, setSY, setWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Edge

public Edge()
Constructs an Edge with default values.


Edge

public Edge(TreeNode s,
            TreeNode e)
Constructs an Edge by specifying the TreeNode from which it begins and the TreeNode at which it ends.

Parameters:
s - Indicates the TreeNode at which this Edge begins. By convention, this is the parent node.
e - Indicates the TreeNode at which this Edge ends. By convention, this is the child node.
Method Detail

setStart

public void setStart(TreeNode s)
Assigns the starting TreeNode for this Edge.

Parameters:
s - Specifies the TreeNode at which this Edge begins. By convention, this is the parent node. A reference to s is assigned to start.

setEnd

public void setEnd(TreeNode e)
Assigns the ending TreeNode for this Edge.

Parameters:
e - Specifies the TreeNode at which this Edge ends. By convention, this is the child node. A reference to e is assigned to end.

getStart

public TreeNode getStart()
Accesses the starting TreeNode for this Edge.

Returns:
Gives the TreeNode reference stored in start. If start has not been initialized, returns null.

getEnd

public TreeNode getEnd()
Accesses the ending TreeNode for this Edge.

Returns:
Gives the TreeNode reference stored in end. If end has not been initialized, returns null.