Class Times

java.lang.Object
rgu.transport.algorithms.util.Times

public final class Times extends Object
Utility class for working with time.
Author:
Lee A. Christie
  • Method Details

    • all

      public static <T> Predicate<T> all()
      A predicate which always returns true.
      Type Parameters:
      T - any type
      Returns:
      a predicate which returns true
    • always

      public static Predicate<LocalTime> always()
      Returns a predicate which accepts all times.
      Returns:
      a predicate which accepts all times
    • never

      public static Predicate<LocalTime> never()
      Returns a predicate which rejects all times.
      Returns:
      a predicate which rejects all times
    • 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.
      use Range
      Returns a predicate which accepts times between two give times, inclusive.
      Parameters:
      start - the start time, not null
      end - 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.
      use Range
      Returns a predicate which accepts times between two give times, including start but excluding end.
      Parameters:
      start - the start time, not null
      bound - the upper bound time, not null
      Returns:
      a predicate which tests for the given range
      Throws:
      IllegalArgumentException - if start >= end