public final class LocalTimeHelper extends Object
Constructor and Description |
---|
LocalTimeHelper() |
Modifier and Type | Method and Description |
---|---|
static int |
compare(LocalTime d1,
LocalTime d2)
Compare two LocalTime instances, handling null values.
|
static LocalTime |
getLocalTime(LocalDateTime date)
Convert a LocalDateTime instance to a LocalTime instance, handling null values.
|
static long |
getMillisecondsInRange(LocalTime rangeStart,
LocalTime rangeEnd)
Calculate the number of milliseconds between two LocalTime instances,
handling null values.
|
static LocalDateTime |
setEndTime(LocalDateTime date,
LocalTime time)
Return a LocalDateTime instance which composed of the LocalDate
instance from the date argument and the LocalTime instance of
the time argument, handling null values.
|
static LocalDateTime |
setTime(LocalDateTime date,
LocalTime time)
Return a LocalDateTime instance which composed of the LocalDate
instance from the date argument and the LocalTime instance of
the time argument, handling null values.
|
public static LocalTime getLocalTime(LocalDateTime date)
date
- LocalDateTime instancepublic static int compare(LocalTime d1, LocalTime d2)
d1
- LocalTime instanced2
- LocalTime instancepublic static LocalDateTime setTime(LocalDateTime date, LocalTime time)
date
- LocalDateTime instancetime
- LocalTime instancepublic static LocalDateTime setEndTime(LocalDateTime date, LocalTime time)
date
- LocalDateTime instancetime
- LocalTime instancepublic static long getMillisecondsInRange(LocalTime rangeStart, LocalTime rangeEnd)
rangeStart
- LocalTime instancerangeEnd
- LocalTime instanceCopyright © 2000–2024 Packwood Software. All rights reserved.