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); }
private Project getPrerequisite(Requirement<Project> requirement2) { if (requirement2 == null) return null; return requirement2.getPrerequisite(now); }
private boolean contains(Requirement<Project> contained) { if (requirement.equals(contained)) return true; if (next == null) return false; return next.contains(contained); }
private Project getPrerequsiteEvenIfExpired() { return requirement.getPrerequisiteEvenIfExpired(now); }