Package com.codetaco.cli.type
Class TimeRange
- java.lang.Object
-
- com.codetaco.cli.type.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 Summary
Constructors Constructor Description TimeRange()
Instantiates a new Time range.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(String date)
Contains boolean.boolean
contains(LocalDateTime date)
Contains boolean.boolean
contains(LocalTime date)
Contains boolean.boolean
contains(ZonedDateTime date)
Contains boolean.boolean
contains(Date date)
Contains boolean.
-
-
-
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
-
-