Class TimeRange


  • public final class TimeRange
    extends Object
    This class provides a range of two times and methods to determine if another time is within the range. This is inclusive of the times on either end of the range. If the provided parameters include a date part then that date part is ignored for purposes of the comparisons.

    TimeRange class.

    • Constructor Detail

      • TimeRange

        public TimeRange()
        Instantiates a new Time range.
    • Method Detail

      • contains

        public boolean contains​(Date date)
        Contains boolean.
        Parameters:
        date - the date
        Returns:
        the boolean
      • contains

        public boolean contains​(LocalTime date)
        Contains boolean.
        Parameters:
        date - the date
        Returns:
        the boolean
      • contains

        public boolean contains​(LocalDateTime date)
        Contains boolean.
        Parameters:
        date - the date
        Returns:
        the boolean
      • contains

        public boolean contains​(ZonedDateTime date)
        Contains boolean.
        Parameters:
        date - the date
        Returns:
        the boolean
      • contains

        public boolean contains​(String date)
        Contains boolean.
        Parameters:
        date - the date
        Returns:
        the boolean