Class ModelGraph


  • public class ModelGraph
    extends java.lang.Object
    A model graph contains the dependency graph of config models.
    Since:
    5.1
    Author:
    Ulf Lilleengen
    • Constructor Summary

      Constructors 
      Constructor Description
      ModelGraph​(java.util.List<ModelNode> modelNodes, java.util.List<ModelNode> roots)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<ModelNode> topologicalSort()
      Performs a topological sort ot the models stored in this graph.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModelGraph

        public ModelGraph​(java.util.List<ModelNode> modelNodes,
                          java.util.List<ModelNode> roots)
    • Method Detail

      • topologicalSort

        public java.util.List<ModelNode> topologicalSort()
        Performs a topological sort ot the models stored in this graph. The algorithm is based on Kahn topological sort.
        Returns:
        a sorted list of ModelNode in dependency order.