Class LinkedDirectedGraph.LinkedDiGraphNode<N,E>
- java.lang.Object
-
- com.google.javascript.jscomp.graph.LinkedDirectedGraph.LinkedDiGraphNode<N,E>
-
- All Implemented Interfaces:
Annotatable,DiGraph.DiGraphNode<N,E>,GraphNode<N,E>,GraphvizGraph.GraphvizNode
- Enclosing class:
- LinkedDirectedGraph<N,E>
public static class LinkedDirectedGraph.LinkedDiGraphNode<N,E> extends java.lang.Object implements DiGraph.DiGraphNode<N,E>, GraphvizGraph.GraphvizNode
A directed graph node that stores outgoing edges and incoming edges as an list within the node itself.
-
-
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 node.java.lang.StringgetId()Retrieves the unique ID.java.util.List<LinkedDirectedGraph.LinkedDiGraphEdge<N,E>>getInEdges()java.lang.StringgetLabel()Retrieves the label of the node.java.util.List<LinkedDirectedGraph.LinkedDiGraphEdge<N,E>>getOutEdges()NgetValue()Retrieves the node's value.voidsetAnnotation(Annotation data)Annotates a piece of information to the object.java.lang.StringtoString()
-
-
-
Field Detail
-
value
protected final N value
-
-
Method Detail
-
getValue
public N getValue()
Description copied from interface:GraphNodeRetrieves the node's 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.GraphvizNodeRetrieves color of the node.- Specified by:
getColorin interfaceGraphvizGraph.GraphvizNode- Returns:
- The color of the node.
-
getId
public java.lang.String getId()
Description copied from interface:GraphvizGraph.GraphvizNodeRetrieves the unique ID.- Specified by:
getIdin interfaceGraphvizGraph.GraphvizNode- Returns:
- A the unique ID of the node.
-
getLabel
public java.lang.String getLabel()
Description copied from interface:GraphvizGraph.GraphvizNodeRetrieves the label of the node.- Specified by:
getLabelin interfaceGraphvizGraph.GraphvizNode- Returns:
- Label of the node.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getInEdges
public java.util.List<LinkedDirectedGraph.LinkedDiGraphEdge<N,E>> getInEdges()
- Specified by:
getInEdgesin interfaceDiGraph.DiGraphNode<N,E>
-
getOutEdges
public java.util.List<LinkedDirectedGraph.LinkedDiGraphEdge<N,E>> getOutEdges()
- Specified by:
getOutEdgesin interfaceDiGraph.DiGraphNode<N,E>
-
-