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.StringgetColor()Retrieves color of the edge.LinkedDirectedGraph.LinkedDiGraphNode<N,E>getDestination()java.lang.StringgetLabel()Retrieves the label of the edge.java.lang.StringgetNode1Id()Get the first node in the edge.java.lang.StringgetNode2Id()Get the second node in the edge.GraphNode<N,E>getNodeA()GraphNode<N,E>getNodeB()LinkedDirectedGraph.LinkedDiGraphNode<N,E>getSource()EgetValue()Retrieves the edge's value.voidsetAnnotation(Annotation data)Annotates a piece of information to the object.java.lang.StringtoString()
-
-
-
Field Detail
-
value
protected final E value
-
-
Method Detail
-
getSource
public LinkedDirectedGraph.LinkedDiGraphNode<N,E> getSource()
- Specified by:
getSourcein interfaceDiGraph.DiGraphEdge<N,E>
-
getDestination
public LinkedDirectedGraph.LinkedDiGraphNode<N,E> getDestination()
- Specified by:
getDestinationin interfaceDiGraph.DiGraphEdge<N,E>
-
getValue
public E getValue()
Description copied from interface:Graph.GraphEdgeRetrieves the edge's value.- Specified by:
getValuein interfaceGraph.GraphEdge<N,E>- Returns:
- The value.
-
getAnnotation
public <A extends Annotation> A getAnnotation()
Description copied from interface:AnnotatableRetrieves a piece of information that has been annotated.- Specified by:
getAnnotationin interfaceAnnotatable- Returns:
- The annotation or
nullif the object has not been annotated.
-
setAnnotation
public void setAnnotation(Annotation data)
Description copied from interface:AnnotatableAnnotates a piece of information to the object.- Specified by:
setAnnotationin interfaceAnnotatable- Parameters:
data- Information to be annotated.
-
getColor
public java.lang.String getColor()
Description copied from interface:GraphvizGraph.GraphvizEdgeRetrieves color of the edge.- Specified by:
getColorin interfaceGraphvizGraph.GraphvizEdge- Returns:
- The color of the edge.
-
getLabel
public java.lang.String getLabel()
Description copied from interface:GraphvizGraph.GraphvizEdgeRetrieves the label of the edge.- Specified by:
getLabelin interfaceGraphvizGraph.GraphvizEdge- Returns:
- Label of the edge.
-
getNode1Id
public java.lang.String getNode1Id()
Description copied from interface:GraphvizGraph.GraphvizEdgeGet the first node in the edge. In a directed node, this will be the source node.- Specified by:
getNode1Idin interfaceGraphvizGraph.GraphvizEdge- Returns:
- First node in the edge.
-
getNode2Id
public java.lang.String getNode2Id()
Description copied from interface:GraphvizGraph.GraphvizEdgeGet the second node in the edge. In a directed node, this will be the destination node.- Specified by:
getNode2Idin interfaceGraphvizGraph.GraphvizEdge- Returns:
- First node in the edge.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getNodeA
public GraphNode<N,E> getNodeA()
- Specified by:
getNodeAin interfaceGraph.GraphEdge<N,E>
-
-