Package nzilbb.util

Class DependencyGraph<C>


  • public class DependencyGraph<C>
    extends Object
    Graph of dependencies.
    Author:
    Robert Fromont robert@fromont.net.nz
    • Constructor Detail

      • DependencyGraph

        public DependencyGraph()
        Default constructor.
    • Method Detail

      • getNodes

        public Set<DependencyNode<C>> getNodes()
        Getter for nodes: All the nodes in the graph.
        Returns:
        All the nodes in the graph.
      • resolve

        public Collection<DependencyNode<C>> resolve()
                                              throws CircularDependencyException
        Resolves dependencies, and returns an ordered list of nodes reflecting the order in which nodes must be processed to ensure each node's depencies are met before processing.
        Returns:
        An ordered list of nodes reflecting the order in which nodes must be processed to ensure each node's depencies are met before processing.
        Throws:
        CircularDependencyException - If a circular dependency is detected.