|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xqhs.graphs.representation.AbstractVisualizableGraphComponent
net.xqhs.graphs.graph.SimpleEdge
public class SimpleEdge
A simple implementation on the Edge interface, also inheriting functions from
AbstractVisualizableGraphComponent.
| Field Summary | |
|---|---|
protected Node |
from
The source of the edge. |
protected java.lang.String |
label
The label of the edge. |
protected Node |
to
The destination of the edge. |
| Fields inherited from class net.xqhs.graphs.representation.AbstractVisualizableGraphComponent |
|---|
representations |
| Constructor Summary | |
|---|---|
SimpleEdge(Node fromNode,
Node toNode,
java.lang.String edgeLabel)
Constructs a new edge. |
|
| 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. |
| Methods inherited from class net.xqhs.graphs.representation.AbstractVisualizableGraphComponent |
|---|
addRepresentation, getFirstRepresentationForRoot, getRepresentations, getRepresentationsForRoot |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String label
protected Node from
protected Node to
| Constructor Detail |
|---|
public SimpleEdge(Node fromNode,
Node toNode,
java.lang.String edgeLabel)
fromNode - : the source Node; the edge is added to the node's outEdges list.toNode - : the destination Node; the edge is added to the node's inEdges list.edgeLabel - : the label of the edge.| Method Detail |
|---|
public java.lang.String getLabel()
EdgetoString functions.
getLabel in interface Edgepublic Node getFrom()
getFrom in interface EdgeNodepublic Node getTo()
getTo in interface EdgeNodepublic java.lang.String toString()
Edge
toString in interface EdgetoString in class java.lang.ObjectString representation of the edgepublic java.lang.String toStringShort()
Edge
toStringShort in interface EdgeString representation of the edgepublic java.lang.String toStringShort(boolean isBackward)
Edge
toStringShort in interface EdgeisBackward - - mentions that the edge is in opposite direction with respect to the representation and should be
represented accordingly
String representation of the edge
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||