net.sourceforge.fluxion.graph
Interface Edge

All Known Subinterfaces:
OWLEdge
All Known Implementing Classes:
AbstractEdge, IsAEdge, NestedEdge, ValueEdge, WalkEdge

public interface Edge

An Edge is a structure linking two Nodes in a graph. Any implementation of Edge> should define the following things...

Version:
0.1
Author:
Tony Burdett
See Also:
Graph, Node

Method Summary
 void accept(EdgeVisitor visitor)
           
 Node getHeadNode()
          Return the Node at the head of this Edge.
 java.lang.String getLabel()
          A String to use as the label for this Edge when drawn on the graph.
 Node getTailNode()
          Return the Node at the tail of this Edge.
 void setHeadNode(Node head)
          Set the Node at the head of this Edge.
 void setLabel(java.lang.String label)
          Sets the String to use as a label.
 void setTailNode(Node tail)
          Set the Node at the tail of this Edge.
 

Method Detail

setLabel

void setLabel(java.lang.String label)
Sets the String to use as a label. This is optional, and is used for clarity when drawing the graph illustration only.

Parameters:
label - the label on this edge

getLabel

java.lang.String getLabel()
A String to use as the label for this Edge when drawn on the graph.

Returns:
the label

setHeadNode

void setHeadNode(Node head)
Set the Node at the head of this Edge. This method is very important for describing the structure of the graph. Nodes can be freely added to the graph, as can edges, but without careful sturcturing of ehad and tail nodes on an edge the graph will have no sensible structure.

Parameters:
head - the node at the head of this edge

getHeadNode

Node getHeadNode()
Return the Node at the head of this Edge.

Returns:
the head node

setTailNode

void setTailNode(Node tail)
Set the Node at the tail of this Edge. This method is very important for describing the structure of the graph. Nodes can be freely added to the graph, as can edges, but without careful sturcturing of ehad and tail nodes on an edge the graph will have no sensible structure.

Parameters:
tail - the node at the tail of this edge

getTailNode

Node getTailNode()
Return the Node at the tail of this Edge.

Returns:
the tail node

accept

void accept(EdgeVisitor visitor)


Copyright © 2010. All Rights Reserved.