@Override boolean isBefore(PlainTime t1, PlainTime t2) { return t1.isBefore(t2); }
/** * <p>Determines the end of the day period which covers given clock time. </p> * * @param context the clock time a day period is searched for * @return end of day period around given clock time, exclusive * @see #getStart(PlainTime) * @since 3.13/4.10 */ /*[deutsch] * <p>Ermittelt das Ende des Tagesabschnitts, der die angegebene Uhrzeit enthält. </p> * * @param context the clock time a day period is searched for * @return end of day period around given clock time, exclusive * @see #getStart(PlainTime) * @since 3.13/4.10 */ public PlainTime getEnd(PlainTime context) { PlainTime compare = ( (context.getHour() == 24) ? PlainTime.midnightAtStartOfDay() : context); for (PlainTime key : this.codeMap.keySet()) { if (compare.isBefore(key)) { return key; } } return this.codeMap.firstKey(); }
if (compare.isSimultaneous(key)) { return key; } else if (compare.isBefore(key)) { break; } else {
@Override public long between(PlainTimestamp start, PlainTimestamp end) { long count = dateRule.between(start.toDate(), end.toDate()); if ((count > 0) && start.toTime().isAfter(end.toTime())) { count--; } else if ((count < 0) && start.toTime().isBefore(end.toTime())) { count++; } return count; } };
} else if ((delta < 0) && t1.isBefore(t2)) { delta++;
} else if ((delta < 0) && t1.isBefore(t2)) { delta++;
} else if ((amount < 0) && t1.isBefore(t2)) { amount++;