Class TopologicalOrder
java.lang.Object
org.spongepowered.collections.graph.TopologicalOrder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> List<T>
createOrderedLoad
(DirectedGraph<T> graph) Performs a topological sort over the directed graph, fir the purpose of determining load order between a set of components where an edge is representing a load-after dependency.
-
Constructor Details
-
TopologicalOrder
public TopologicalOrder()
-
-
Method Details
-
createOrderedLoad
Performs a topological sort over the directed graph, fir the purpose of determining load order between a set of components where an edge is representing a load-after dependency. For example an edge from node A to node B signifies that A depends on B and that B must load before A, the resulting topological order would therefore be[B, A]
.- Throws:
CyclicGraphException
- if the graph contains a cycle.
-