Package ai.tock.nlp.entity.date
Class DateEntityValue
-
- 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 final ZonedDateTimegetDate()final DateEntityGraingetGrain()ZonedDateTimestart()Returns the start inclusive date. ZonedDateTimeend(ZoneId zoneId)Returns the end exclusive date. Durationduration()-
-
Constructor Detail
-
DateEntityValue
DateEntityValue(ZonedDateTime date, DateEntityGrain grain)
-
-
Method Detail
-
getDate
final ZonedDateTime getDate()
-
getGrain
final DateEntityGrain getGrain()
-
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
-
-
-
-