public final class LocalDateTimeRange extends Object implements Comparable<LocalDateTimeRange>
| Constructor and Description |
|---|
LocalDateTimeRange(LocalDateTime startDate,
LocalDateTime endDate)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(LocalDateTime date)
This method compares a target date with a date range.
|
int |
compareTo(LocalDateTimeRange o) |
boolean |
equals(Object o) |
LocalDateTime |
getEnd()
Retrieve the date at the end of the range.
|
LocalDateTime |
getStart()
Retrieve the date at the start of the range.
|
int |
hashCode() |
LocalDateTimeRange |
intersection(LocalDateTimeRange range)
return a range representing the intersection between this range and the supplied range.
|
boolean |
intersectsWith(LocalDateTimeRange range)
Returns true if this range intersects with the supplied range.
|
boolean |
isAfter(LocalDateTimeRange range)
Returns true if this range is after the supplied range.
|
boolean |
isBefore(LocalDateTimeRange range)
Returns true if this range is before the supplied range.
|
String |
toString() |
public LocalDateTimeRange(LocalDateTime startDate, LocalDateTime endDate)
startDate - start dateendDate - end datepublic LocalDateTime getStart()
public LocalDateTime getEnd()
public boolean isBefore(LocalDateTimeRange range)
range - range to testpublic boolean isAfter(LocalDateTimeRange range)
range - range to testpublic boolean intersectsWith(LocalDateTimeRange range)
range - range to testpublic LocalDateTimeRange intersection(LocalDateTimeRange range)
range - range to testpublic int compareTo(LocalDateTime date)
date - target datepublic int compareTo(LocalDateTimeRange o)
compareTo in interface Comparable<LocalDateTimeRange>Copyright © 2000–2026 MPXJ. All rights reserved.