-
- All Implemented Interfaces:
-
ai.tock.nlp.entity.Value,ai.tock.nlp.entity.date.DateEntityRange
public final class DateIntervalEntityValue implements DateEntityRange
Date interval definition.
-
-
Field Summary
Fields Modifier and Type Field Description private final DateEntityValuedateprivate final DateEntityValuetoDate
-
Constructor Summary
Constructors Constructor Description DateIntervalEntityValue(DateEntityValue date, DateEntityValue toDate)
-
Method Summary
Modifier and Type Method Description ZonedDateTimestart()Returns the start inclusive date. ZonedDateTimeinclusiveEnd(ZoneId zoneId)Returns the end inclusive date. ZonedDateTimeend(ZoneId zoneId)Returns the end exclusive date. Durationduration()final DateEntityValuecomponent1()final DateEntityValuecomponent2()final DateIntervalEntityValuecopy(DateEntityValue date, DateEntityValue toDate)final DateEntityValuegetDate()final DateEntityValuegetToDate()-
Methods inherited from class ai.tock.nlp.entity.date.DateIntervalEntityValue
end, 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
-
DateIntervalEntityValue
DateIntervalEntityValue(DateEntityValue date, DateEntityValue toDate)
-
-
Method Detail
-
start
ZonedDateTime start()
Returns the start inclusive date. Ie
9h -> 9h
from 9h to 10h -> 9h
-
inclusiveEnd
ZonedDateTime inclusiveEnd(ZoneId zoneId)
Returns the end inclusive date. Ie:
from 9h to 10h -> 10h
from 9h to 10h00 -> 10h
9h -> 10h
this morning (4h to 12h) -> 12h
-
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 DateEntityValue component1()
-
component2
final DateEntityValue component2()
-
copy
final DateIntervalEntityValue copy(DateEntityValue date, DateEntityValue toDate)
-
getDate
final DateEntityValue getDate()
-
getToDate
final DateEntityValue getToDate()
-
-
-
-