Share via


Node<DataT,NodeT,NodeT> Class

  • java.lang.Object
    • com.microsoft.azure.management.resources.fluentcore.dag.Node<DataT,NodeT,NodeT>

Type Parameters

DataT

the type of the data stored in the node

NodeT

the type of the node

NodeT

the type of the node

public class Node<DataT,NodeT extends Node<DataT,NodeT>>

Type represents a node in a Graph<DataT,NodeT>.

Constructor Summary

Constructor Description
Node(final String key, final DataT data)

Creates a graph node.

Method Summary

Modifier and Type Method and Description
void addChild(String childKey)
List<String> children()
DataT data()
boolean hasChildren()
String key()
Graph<DataT, NodeT> owner()
void setOwner(Graph<DataT, NodeT> ownerGraph)

Sets reference to the graph owning this node.

Constructor Details

Node

public Node(final String key, final DataT data)

Creates a graph node.

Parameters:

key - unique id of the node
data - data to be stored in the node

Method Details

addChild

public void addChild(String childKey)

Parameters:

childKey - add a child (neighbour) of this node

children

public List children()

Returns:

children (neighbours) of this node

data

public DataT data()

Returns:

data stored in this node

hasChildren

public boolean hasChildren()

Returns:

true if this node has any children

key

public String key()

Returns:

this node's unique id

owner

public Graph owner()

Returns:

the owner (container) graph of this node.

setOwner

public void setOwner(Graph ownerGraph)

Sets reference to the graph owning this node.

Parameters:

ownerGraph - the owning graph

Applies to