-
Notifications
You must be signed in to change notification settings - Fork 1k
/
IDynamicGraph.java
47 lines (31 loc) · 1.01 KB
/
IDynamicGraph.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package org.testng;
import java.util.Collection;
import java.util.List;
import java.util.Set;
/**
* Represents the graphical representative capabilities of an entity. The entities could be either a
* {@link ISuite} or an {@link ITestNGMethod} object which are usually the logical units of work
* that TestNG deals with.
*/
public interface IDynamicGraph<T> {
boolean addNode(T node);
void addEdge(int weight, T from, T to);
void setVisualisers(Set<IExecutionVisualiser> listener);
void addEdges(int weight, T from, Iterable<T> tos);
List<T> getFreeNodes();
default List<T> getUpstreamDependenciesFor(T node) {
throw new UnsupportedOperationException("Pending implementation");
}
List<T> getDependenciesFor(T node);
void setStatus(Collection<T> nodes, Status status);
void setStatus(T node, Status status);
int getNodeCount();
int getNodeCountWithStatus(Status status);
Set<T> getNodesWithStatus(Status status);
String toDot();
enum Status {
READY,
RUNNING,
FINISHED
}
}