|
||||||||||
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()
Edge
toString
functions.
getLabel
in interface Edge
public Node getFrom()
getFrom
in interface Edge
Node
public Node getTo()
getTo
in interface Edge
Node
public java.lang.String toString()
Edge
toString
in interface Edge
toString
in class java.lang.Object
String
representation of the edgepublic java.lang.String toStringShort()
Edge
toStringShort
in interface Edge
String
representation of the edgepublic java.lang.String toStringShort(boolean isBackward)
Edge
toStringShort
in interface Edge
isBackward
- - 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 |