public class DynamicGraph<T>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DynamicGraph.Status |
Constructor and Description |
---|
DynamicGraph() |
Modifier and Type | Method and Description |
---|---|
void |
addEdge(int weight,
T from,
java.lang.Iterable<T> tos)
Add an edge between two nodes.
|
void |
addEdge(int weight,
T from,
T... tos)
Add an edge between two nodes.
|
void |
addEdge(int weight,
T from,
T to) |
boolean |
addNode(T node)
Add a node to the graph.
|
ListMultiMap<T,org.testng.internal.DynamicGraph.Edge<T>> |
getEdges() |
java.util.List<T> |
getFreeNodes() |
int |
getNodeCount() |
int |
getNodeCountWithStatus(DynamicGraph.Status status) |
void |
setStatus(java.util.Collection<T> nodes,
DynamicGraph.Status status)
Set the status for a set of nodes.
|
void |
setStatus(T node,
DynamicGraph.Status status)
Set the status for a node.
|
java.lang.String |
toDot() |
java.lang.String |
toString() |
public boolean addNode(T node)
public void addEdge(int weight, T from, T to)
weight
- - Represents one of TestRunner.PriorityWeight
ordinals indicating
the weightage of a particular node in the graphfrom
- - Represents the edge that depends on another edge.to
- - Represents the edge on which another edge depends upon.public void addEdge(int weight, T from, java.lang.Iterable<T> tos)
public java.util.List<T> getFreeNodes()
public void setStatus(java.util.Collection<T> nodes, DynamicGraph.Status status)
public void setStatus(T node, DynamicGraph.Status status)
public int getNodeCount()
public int getNodeCountWithStatus(DynamicGraph.Status status)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toDot()
public ListMultiMap<T,org.testng.internal.DynamicGraph.Edge<T>> getEdges()