public final class Interval extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Interval.IntervalBuilder |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(LocalDateTime reference)
Returns whether the given
LocalDateTime is contained in the current Interval . |
boolean |
equals(Object o) |
static Interval.IntervalBuilder |
from(LocalDateTime start)
Starts building a new
Interval with the given start time. |
Duration |
getDuration()
Returns the duration of the interval.
|
LocalDateTime |
getEnd()
The end date of the
Interval . |
LocalDateTime |
getStart()
The start date of the
Interval . |
int |
hashCode() |
boolean |
overlaps(Interval reference)
Returns whether the current
Interval overlaps with the given one. |
Object |
toDuration()
|
String |
toString() |
public static Interval.IntervalBuilder from(LocalDateTime start)
Interval
with the given start time.start
- must not be null.public Duration getDuration()
public boolean contains(LocalDateTime reference)
LocalDateTime
is contained in the current Interval
.reference
- must not be null.public boolean overlaps(Interval reference)
Interval
overlaps with the given one.reference
- must not be null.public Object toDuration()
@Generated(value="lombok") public LocalDateTime getStart()
Interval
.@Generated(value="lombok") public LocalDateTime getEnd()
Interval
.@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
Copyright © 2018 Pivotal Software, Inc.. All rights reserved.