Class LinkedDirectedGraph.LinkedDiGraphEdge<N,E>
java.lang.Object
com.google.javascript.jscomp.graph.LinkedDirectedGraph.LinkedDiGraphEdge<N,E>
- All Implemented Interfaces:
Annotatable
,DiGraph.DiGraphEdge<N,
,E> Graph.GraphEdge<N,
,E> GraphvizGraph.GraphvizEdge
- Enclosing class:
LinkedDirectedGraph<N,
E>
public static class LinkedDirectedGraph.LinkedDiGraphEdge<N,E>
extends Object
implements DiGraph.DiGraphEdge<N,E>, GraphvizGraph.GraphvizEdge
A directed graph edge that stores the source and destination nodes at each edge.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
ARetrieves a piece of information that has been annotated.getColor()
Retrieves color of the edge.getLabel()
Retrieves the label of the edge.Get the first node in the edge.Get the second node in the edge.getNodeA()
getNodeB()
getValue()
Retrieves the edge's value.void
setAnnotation
(Annotation data) Annotates a piece of information to the object.toString()
-
Field Details
-
value
-
-
Method Details
-
getSource
- Specified by:
getSource
in interfaceDiGraph.DiGraphEdge<N,
E>
-
getDestination
- Specified by:
getDestination
in interfaceDiGraph.DiGraphEdge<N,
E>
-
getValue
Description copied from interface:Graph.GraphEdge
Retrieves the edge's value.- Specified by:
getValue
in interfaceGraph.GraphEdge<N,
E> - Returns:
- The value.
-
getAnnotation
Description copied from interface:Annotatable
Retrieves a piece of information that has been annotated.- Specified by:
getAnnotation
in interfaceAnnotatable
- Returns:
- The annotation or
null
if the object has not been annotated.
-
setAnnotation
Description copied from interface:Annotatable
Annotates a piece of information to the object.- Specified by:
setAnnotation
in interfaceAnnotatable
- Parameters:
data
- Information to be annotated.
-
getColor
Description copied from interface:GraphvizGraph.GraphvizEdge
Retrieves color of the edge.- Specified by:
getColor
in interfaceGraphvizGraph.GraphvizEdge
- Returns:
- The color of the edge.
-
getLabel
Description copied from interface:GraphvizGraph.GraphvizEdge
Retrieves the label of the edge.- Specified by:
getLabel
in interfaceGraphvizGraph.GraphvizEdge
- Returns:
- Label of the edge.
-
getNode1Id
Description copied from interface:GraphvizGraph.GraphvizEdge
Get the first node in the edge. In a directed node, this will be the source node.- Specified by:
getNode1Id
in interfaceGraphvizGraph.GraphvizEdge
- Returns:
- First node in the edge.
-
getNode2Id
Description copied from interface:GraphvizGraph.GraphvizEdge
Get the second node in the edge. In a directed node, this will be the destination node.- Specified by:
getNode2Id
in interfaceGraphvizGraph.GraphvizEdge
- Returns:
- First node in the edge.
-
toString
-
getNodeA
- Specified by:
getNodeA
in interfaceGraph.GraphEdge<N,
E>
-
getNodeB
- Specified by:
getNodeB
in interfaceGraph.GraphEdge<N,
E>
-