Class PathFinder

java.lang.Object
org.trustdeck.algorithms.PathFinder

public class PathFinder extends Object
This class allows for finding a path between two arbitrary domains, if there is one.
Author:
Eric Wündisch and Armin Müller
  • Constructor Details

    • PathFinder

      public PathFinder(List<Domain> nodes)
      Constructor to instantiate a new domain tree.
      Parameters:
      nodes - a list of the tree's nodes
  • Method Details

    • getPath

      public List<Domain> getPath(String sourceName, String destName)
      Finds the path between two domains in the domain tree.
      Parameters:
      sourceName - the name of the source domain
      destName - the name of the destination domain
      Returns:
      the path from the source domain to the destination domain as a list of domain nodes, or null if nothing was found