Class TopologicalOrder

java.lang.Object
org.spongepowered.collections.graph.TopologicalOrder

public class TopologicalOrder extends Object
  • Constructor Details

    • TopologicalOrder

      public TopologicalOrder()
  • Method Details

    • createOrderedLoad

      public static <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. 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.