Class Graph<DataT,NodeT extends Node<DataT,NodeT>>
- java.lang.Object
-
- com.microsoft.azure.management.resources.fluentcore.dag.Graph<DataT,NodeT>
-
- Type Parameters:
DataT- the type of the data stored in the graph's nodesNodeT- the type of the nodes in the graph
- Direct Known Subclasses:
DAGraph
public class Graph<DataT,NodeT extends Node<DataT,NodeT>> extends Object
Type representing a directed graph data structure.Each node in a graph is represented by
Node
-
-
Constructor Summary
Constructors Constructor Description Graph()Creates a directed graph.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNode(NodeT node)Adds a node to this graph.protected StringfindPath(String start, String end)Find the path.Collection<NodeT>getNodes()voidvisit(com.microsoft.azure.management.resources.fluentcore.dag.Graph.Visitor visitor)Perform DFS visit in this graph.
-
-
-
Method Detail
-
getNodes
public Collection<NodeT> getNodes()
- Returns:
- all nodes in the graph.
-
addNode
public void addNode(NodeT node)
Adds a node to this graph.- Parameters:
node- the node
-
visit
public void visit(com.microsoft.azure.management.resources.fluentcore.dag.Graph.Visitor visitor)
Perform DFS visit in this graph.The directed graph will be traversed in DFS order and the visitor will be notified as search explores each node and edge.
- Parameters:
visitor- the graph visitor
-
-