Package org.testng.internal
Class Graph<T>
java.lang.Object
org.testng.internal.Graph<T>
Simple graph class to implement topological sort (used to sort methods based on what groups they
depend on).
- Author:
- Cedric Beust, Aug 19, 2004
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addPredecessor
(T tm, T predecessor) getPredecessors
(T node) boolean
isIndependent
(T object) void
toString()
-
Constructor Details
-
Graph
-
-
Method Details
-
addNode
-
getPredecessors
-
isIndependent
-
addPredecessor
-
getIndependentNodes
- Returns:
- All the nodes that don't have any order with each other.
-
getStrictlySortedNodes
- Returns:
- All the nodes that have an order with each other, sorted in one of the valid sorts.
-
topologicalSort
public void topologicalSort() -
findPredecessors
- Parameters:
o
- - The predecessor- Returns:
- A list of all the predecessors for o
-
toString
-