/** * Sets the new global result envelope. * * @param min the minimal result time * @param max the maximal result time */ default void setResultTime(DateTime min, DateTime max) { setMinResultTime(min); setMaxResultTime(max); }
/** * Update the global result time by extending the global envelope to include the specified {@code ITime}. * * @param resultTime the time to include */ default void updateResultTime(Time resultTime) { if (resultTime == null) { return; } final TimePeriod tp = toTimePeriod(resultTime); if (!hasMinResultTime() || getMinResultTime().isAfter(tp.getStart())) { setMinResultTime(tp.getStart()); } if (!hasMaxResultTime() || getMaxResultTime().isBefore(tp.getEnd())) { setMaxResultTime(tp.getEnd()); } }