net.xqhs.graphs.graph
Interface Edge

All Superinterfaces:
GraphComponent
All Known Implementing Classes:
ContextGraph.ContextEdge, EdgeP, SettableEdge, SimpleEdge

public interface Edge
extends GraphComponent

Interface for a simple, labeled, directed edge, characterized by its source and destination nodes.

Author:
Andrei Olaru

Method Summary
 Node getFrom()
           
 java.lang.String getLabel()
          If in need of a readable rendition of the edge's features, use the toString functions.
 Node getTo()
           
 java.lang.String toString()
          Constructs a full representation of the edge, including its two adjacent nodes.
 java.lang.String toStringShort()
          Constructs a short representation of the edge, including only information about label.
 java.lang.String toStringShort(boolean isBackward)
          Constructs a short representation of the edge, including only information about label and direction.
 

Method Detail

getLabel

java.lang.String getLabel()
If in need of a readable rendition of the edge's features, use the toString functions.

Returns:
the label of the edge

getFrom

Node getFrom()
Returns:
the source Node

getTo

Node getTo()
Returns:
the destination Node

toString

java.lang.String toString()
Constructs a full representation of the edge, including its two adjacent nodes.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of the edge

toStringShort

java.lang.String toStringShort()
Constructs a short representation of the edge, including only information about label.

Returns:
a short String representation of the edge

toStringShort

java.lang.String toStringShort(boolean isBackward)
Constructs a short representation of the edge, including only information about label and direction. The direction depends on the general direction of the representation.

Parameters:
isBackward - - mentions that the edge is in opposite direction with respect to the representation and should be represented accordingly
Returns:
a short String representation of the edge