Class Node<DataT,NodeT extends Node<DataT,NodeT>>
java.lang.Object
com.microsoft.azure.management.resources.fluentcore.dag.Node<DataT,NodeT>
- Type Parameters:
DataT
- the type of the data stored in the nodeNodeT
- the type of the node
- Direct Known Subclasses:
DAGNode
Type represents a node in a
Graph
.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Node
Creates a graph node.- Parameters:
key
- unique id of the nodedata
- data to be stored in the node
-
-
Method Details
-
key
- Returns:
- this node's unique id
-
data
- Returns:
- data stored in this node
-
hasChildren
public boolean hasChildren()- Returns:
- true if this node has any children
-
children
- Returns:
- children (neighbours) of this node
-
addChild
- Parameters:
childKey
- add a child (neighbour) of this node
-
removeChild
- Parameters:
childKey
- remove child (neighbour) of this node
-
setOwner
Sets reference to the graph owning this node.- Parameters:
ownerGraph
- the owning graph
-
owner
- Returns:
- the owner (container) graph of this node.
-