Package org.salespointframework.time
Class Interval.IntervalBuilder
java.lang.Object
org.salespointframework.time.Interval.IntervalBuilder
- Enclosing class:
- Interval
public static class Interval.IntervalBuilder extends Object
-
Method Summary
Modifier and Type Method Description Interval
to(LocalDateTime end)
Creates anInterval
from the current start time until the given end time.Interval
withLength(TemporalAmount amount)
Creates a newInterval
from the current start time adding the givenTemporalAmount
to it.
-
Method Details
-
to
Creates anInterval
from the current start time until the given end time.- Parameters:
end
- must not be null and after the current start time or equal to it.- Returns:
- will never be null.
-
withLength
Creates a newInterval
from the current start time adding the givenTemporalAmount
to it.- Parameters:
amount
- must not be null.- Returns:
- will never be null.
- See Also:
Duration
-