/** * Sets the new global phenomenon envelope. * * @param min the minimal phenomenon time * @param max the maximal phenomenon time */ default void setPhenomenonTime(DateTime min, DateTime max) { setMinPhenomenonTime(min); setMaxPhenomenonTime(max); }
/** * Update the global phenomenon time by extending the global envelope to include the specified {@code ITime}. * * @param eventTime the time to include */ default void updatePhenomenonTime(Time eventTime) { Objects.requireNonNull(eventTime, EVENT_TIME); final TimePeriod tp = toTimePeriod(eventTime); if (!hasMinPhenomenonTime() || getMinPhenomenonTime().isAfter(tp.getStart())) { setMinPhenomenonTime(tp.getStart()); } if (!hasMaxPhenomenonTime() || getMaxPhenomenonTime().isBefore(tp.getEnd())) { setMaxPhenomenonTime(tp.getEnd()); } }