Package org.sellcom.geotemporal.time
Class LocalTimes
- java.lang.Object
-
- org.sellcom.geotemporal.time.LocalTimes
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisInRange(LocalTime time, LocalTime startTime, LocalTime endTime)Checks whether the given time is within the range of the given times.static LocalTimeparse(String time)Parses the given local time.static StringtoString(LocalTime time)Returns the string representing the given time Returns24:00if the time equals toLocalTime.MAX.
-
-
-
Method Detail
-
isInRange
public static boolean isInRange(LocalTime time, LocalTime startTime, LocalTime endTime)
Checks whether the given time is within the range of the given times. Both the start time and the end time are inclusive and the range may wrap around the end of the day.- Throws:
IllegalArgumentException- iftimeisnullIllegalArgumentException- ifstartTimeisnullIllegalArgumentException- ifendTimeisnull- Since:
- 1.0
-
parse
public static LocalTime parse(String time)
Parses the given local time. ReturnsLocalTime.MAXif the time corresponds to24:00.- Throws:
IllegalArgumentException- iftimeisnullor empty- Since:
- 1.0
-
toString
public static String toString(LocalTime time)
Returns the string representing the given time Returns24:00if the time equals toLocalTime.MAX.- Throws:
IllegalArgumentException- iftimeisnull- Since:
- 1.0
-
-