Class Times
java.lang.Object
rgu.transport.algorithms.util.Times
Utility class for working with time.
- Author:
- Lee A. Christie
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Predicate<T> all()A predicate which always returns true.always()Returns a predicate which accepts all times.betweenHalfOpen(LocalTime start, LocalTime bound) Deprecated, for removal: This API element is subject to removal in a future version.betweenInclusive(LocalTime start, LocalTime end) Deprecated, for removal: This API element is subject to removal in a future version.useRangenever()Returns a predicate which rejects all times.
-
Method Details
-
all
A predicate which always returns true.- Type Parameters:
T- any type- Returns:
- a predicate which returns true
-
always
-
never
-
betweenInclusive
@Deprecated(forRemoval=true) public static Predicate<LocalTime> betweenInclusive(LocalTime start, LocalTime end) Deprecated, for removal: This API element is subject to removal in a future version.useRangeReturns a predicate which accepts times between two give times, inclusive.- Parameters:
start- the start time, not nullend- the end time, not null- Returns:
- a predicate which tests for the given range
- Throws:
IllegalArgumentException- if start > end
-
betweenHalfOpen
@Deprecated(forRemoval=true) public static Predicate<LocalTime> betweenHalfOpen(LocalTime start, LocalTime bound) Deprecated, for removal: This API element is subject to removal in a future version.useRangeReturns a predicate which accepts times between two give times, including start but excluding end.- Parameters:
start- the start time, not nullbound- the upper bound time, not null- Returns:
- a predicate which tests for the given range
- Throws:
IllegalArgumentException- if start >= end
-
Range