Пример #1
0
 public String descendants(RequirementGraph<Project> graph) {
   if (next != null && next.contains(requirement)) return "!";
   if (requirement == null) return "";
   Project prerequisite = getPrerequsiteEvenIfExpired();
   if (prerequisite == null) return "";
   Collection<Requirement<Project>> requirements = finder.getRequirements(prerequisite, graph);
   return " "
       + requirement.rightArrow(now)
       + " "
       + prerequisite
       + new DescendantAncestry(now, first(requirements), finder, this).descendants(graph);
 }
Пример #2
0
 private Cycle<Requirement<Project>> cycleFromOutgoingRequirements(
     StatusInstant<Project> statusInstant) {
   for (Requirement<Project> blocker :
       finder.getRequirements(getPrerequisite(requirement), statusInstant.getGraph())) {
     RequirementNode<Project> prerequisite = getPrerequisite(blocker);
     if (prerequisite != null && !prerequisite.intrinsicallyInactionable(statusInstant)) {
       Cycle<Requirement<Project>> cycle =
           new DescendantAncestry(now, blocker, finder, this).findCycle(statusInstant);
       if (cycle != null) return cycle;
     }
   }
   return null;
 }