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 java.lang.Object implements DiGraph.DiGraphEdge<N,E>, GraphvizGraph.GraphvizEdge
A directed graph edge that stores the source and destination nodes at each edge.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A extends Annotation>
AgetAnnotation()
Retrieves a piece of information that has been annotated.java.lang.String
getColor()
Retrieves color of the edge.LinkedDirectedGraph.LinkedDiGraphNode<N,E>
getDestination()
java.lang.String
getLabel()
Retrieves the label of the edge.java.lang.String
getNode1Id()
Get the first node in the edge.java.lang.String
getNode2Id()
Get the second node in the edge.GraphNode<N,E>
getNodeA()
GraphNode<N,E>
getNodeB()
LinkedDirectedGraph.LinkedDiGraphNode<N,E>
getSource()
E
getValue()
Retrieves the edge's value.void
setAnnotation(Annotation data)
Annotates a piece of information to the object.java.lang.String
toString()
-
-
-
Field Detail
-
value
protected final E value
-
-
Method Detail
-
getSource
public LinkedDirectedGraph.LinkedDiGraphNode<N,E> getSource()
- Specified by:
getSource
in interfaceDiGraph.DiGraphEdge<N,E>
-
getDestination
public LinkedDirectedGraph.LinkedDiGraphNode<N,E> getDestination()
- Specified by:
getDestination
in interfaceDiGraph.DiGraphEdge<N,E>
-
getValue
public 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
public <A extends Annotation> A 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
public void setAnnotation(Annotation data)
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
public java.lang.String 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
public java.lang.String 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
public java.lang.String 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
public java.lang.String 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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getNodeA
public GraphNode<N,E> getNodeA()
- Specified by:
getNodeA
in interfaceGraph.GraphEdge<N,E>
-
-