コード例 #1
0
ファイル: DescendantAncestry.java プロジェクト: dsaff/glinda
 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
ファイル: DescendantAncestry.java プロジェクト: dsaff/glinda
 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;
 }