public class DateEntityValue implements DateEntityRange
Wraps a ZonedDateTime with a enum DateEntityGrain.
enum DateEntityGrainDateEntityRange.DefaultImpls| Constructor and Description |
|---|
DateEntityValue(java.time.ZonedDateTime date,
DateEntityGrain grain)
Wraps a ZonedDateTime with a
enum DateEntityGrain. |
| Modifier and Type | Method and Description |
|---|---|
java.time.ZonedDateTime |
component1() |
DateEntityGrain |
component2() |
DateEntityValue |
copy(java.time.ZonedDateTime date,
DateEntityGrain grain)
Wraps a ZonedDateTime with a
enum DateEntityGrain. |
java.time.Duration |
duration() |
java.time.ZonedDateTime |
end(java.time.ZoneId zoneId)
Returns the end exclusive date.
Ie:
|
boolean |
equals(java.lang.Object p) |
java.time.ZonedDateTime |
getDate() |
DateEntityGrain |
getGrain() |
int |
hashCode() |
java.time.ZonedDateTime |
start()
Returns the start inclusive date.
Ie
|
java.lang.String |
toString() |
duration, end, end, inclusiveEnd, inclusiveEnd, startpublic DateEntityValue(@NotNull
java.time.ZonedDateTime date,
@NotNull
DateEntityGrain grain)
Wraps a ZonedDateTime with a enum DateEntityGrain.
enum DateEntityGrain@NotNull public java.time.ZonedDateTime start()
Returns the start inclusive date. Ie
9h -> 9h
from 9h to 10h -> 9h
@NotNull
public java.time.ZonedDateTime end(@NotNull
java.time.ZoneId zoneId)
Returns the end exclusive date. Ie:
from 9h to 10h -> 11h
from 9h to 10h00 -> 10h01
9h -> 10h
@NotNull public java.time.Duration duration()
@NotNull public java.time.ZonedDateTime getDate()
@NotNull public DateEntityGrain getGrain()
@NotNull public java.time.ZonedDateTime component1()
@NotNull public DateEntityGrain component2()
@NotNull public DateEntityValue copy(@NotNull java.time.ZonedDateTime date, @NotNull DateEntityGrain grain)
Wraps a ZonedDateTime with a enum DateEntityGrain.
enum DateEntityGrain@NotNull public java.lang.String toString()
public int hashCode()
public boolean equals(@Nullable
java.lang.Object p)