Class GroupingDefinitionDependencySort


  • public class GroupingDefinitionDependencySort
    extends Object
    • Constructor Detail

      • GroupingDefinitionDependencySort

        public GroupingDefinitionDependencySort()
    • Method Detail

      • sort

        public List<GroupingDefinition> sort​(Collection<GroupingDefinition> groupingDefinitions)
        Sorts set groupingDefinitions according to the mutual dependencies.
        Elements of groupingDefinitions are firstly transformed to TopologicalSort.Node interfaces and then are sorted by sort() method of TopologicalSort.
        Definition of dependency relation:
        The first GroupingDefinition object (in this context) depends on second GroupingDefinition object if the first one contains in its set of UsesNode (obtained through DataNodeContainer.getUses()) a reference to the second one.
        Parameters:
        groupingDefinitions - set of grouping definition which should be sorted according to mutual dependencies
        Returns:
        list of grouping definitions which are sorted by mutual dependencies
        Throws:
        IllegalArgumentException - if groupingDefinitions