-
- All Implemented Interfaces:
-
ai.tock.nlp.entity.Value,ai.tock.nlp.entity.date.DateEntityRange
public final class DateEntityValue implements DateEntityRange
Wraps a ZonedDateTime with a DateEntityGrain.
-
-
Field Summary
Fields Modifier and Type Field Description private final ZonedDateTimedateprivate final DateEntityGraingrain
-
Constructor Summary
Constructors Constructor Description DateEntityValue(ZonedDateTime date, DateEntityGrain grain)
-
Method Summary
Modifier and Type Method Description ZonedDateTimestart()Returns the start inclusive date. ZonedDateTimeend(ZoneId zoneId)Returns the end exclusive date. Durationduration()final ZonedDateTimecomponent1()final DateEntityGraincomponent2()final DateEntityValuecopy(ZonedDateTime date, DateEntityGrain grain)final ZonedDateTimegetDate()final DateEntityGraingetGrain()-
Methods inherited from class ai.tock.nlp.entity.date.DateEntityValue
end, inclusiveEnd, inclusiveEnd -
Methods inherited from class ai.tock.nlp.entity.Value
equals, hashCode, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
DateEntityValue
DateEntityValue(ZonedDateTime date, DateEntityGrain grain)
-
-
Method Detail
-
start
ZonedDateTime start()
Returns the start inclusive date. Ie
9h -> 9h
from 9h to 10h -> 9h
-
end
ZonedDateTime end(ZoneId zoneId)
Returns the end exclusive date. Ie:
from 9h to 10h -> 11h
from 9h to 10h00 -> 10h01
9h -> 10h
-
component1
final ZonedDateTime component1()
-
component2
final DateEntityGrain component2()
-
copy
final DateEntityValue copy(ZonedDateTime date, DateEntityGrain grain)
-
getDate
final ZonedDateTime getDate()
-
getGrain
final DateEntityGrain getGrain()
-
-
-
-