operator + method
Creates a new local time by adding a period to an existing time. The period must not contain any date-related units (days etc) with non-zero values.
time
: The time to add the period toperiod
: The period to add
Returns: The result of adding the period to the time, wrapping via midnight if necessary
Implementation
LocalTime operator +(Period period) {
Preconditions.checkNotNull(period, 'period');
Preconditions.checkArgument(!period.hasDateComponent, 'period', "Cannot add a period with a date component to a time");
return IPeriod.addTimeTo(period, this, 1);
}