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 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.
-
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 node.getId()Retrieves the unique ID.getLabel()Retrieves the label of the node.intReturns a nonnegative integer priority which can be used to order nodes.getValue()Retrieves the node's value.booleanReturns whether a priority has been set.voidsetAnnotation(Annotation data) Annotates a piece of information to the object.voidsetPriority(int priority) Sets a node priority, must be non-negative.toString()
-
Field Details
-
value
-
-
Method Details
-
getValue
Description copied from interface:GraphNodeRetrieves the node's value. -
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
Description copied from interface:AnnotatableAnnotates a piece of information to the object.- Specified by:
setAnnotationin interfaceAnnotatable- Parameters:
data- Information to be annotated.
-
getColor
Description copied from interface:GraphvizGraph.GraphvizNodeRetrieves color of the node.- Specified by:
getColorin interfaceGraphvizGraph.GraphvizNode- Returns:
- The color of the node.
-
getId
Description copied from interface:GraphvizGraph.GraphvizNodeRetrieves the unique ID.- Specified by:
getIdin interfaceGraphvizGraph.GraphvizNode- Returns:
- A the unique ID of the node.
-
getLabel
Description copied from interface:GraphvizGraph.GraphvizNodeRetrieves the label of the node.- Specified by:
getLabelin interfaceGraphvizGraph.GraphvizNode- Returns:
- Label of the node.
-
toString
-
getInEdges
- Specified by:
getInEdgesin interfaceDiGraph.DiGraphNode<N,E>
-
getOutEdges
- Specified by:
getOutEdgesin interfaceDiGraph.DiGraphNode<N,E>
-
hasPriority
public boolean hasPriority()Description copied from interface:DiGraph.DiGraphNodeReturns whether a priority has been set.- Specified by:
hasPriorityin interfaceDiGraph.DiGraphNode<N,E>
-
getPriority
public int getPriority()Description copied from interface:DiGraph.DiGraphNodeReturns a nonnegative integer priority which can be used to order nodes.Throws if a priority has not been set.
- Specified by:
getPriorityin interfaceDiGraph.DiGraphNode<N,E>
-
setPriority
public void setPriority(int priority) Description copied from interface:DiGraph.DiGraphNodeSets a node priority, must be non-negative.- Specified by:
setPriorityin interfaceDiGraph.DiGraphNode<N,E>
-