private static GanttDate min(GanttDate one, GanttDate other) { if (one == null) { return other; } if (other == null) { return one; } return one.compareTo(other) < 0 ? one : other; }
public GanttDate getEnd() { GanttDate result = getEndPeriod(); for (LoadTimeLine loadTimeLine : getChildren()) { GanttDate end = loadTimeLine.getEnd(); if (end != null) { result = result == null || result.compareTo(end) < 0 ? end : result; } } return result; }
public GanttDate getStart() { GanttDate result = getStartPeriod(); for (LoadTimeLine loadTimeLine : getChildren()) { GanttDate start = loadTimeLine.getStart(); if (start != null) { result = result == null || result.compareTo(start) > 0 ? start : result; } } return result; }