Interface Temporal
- All Superinterfaces:
TemporalAccessor
- All Known Subinterfaces:
ChronoLocalDate, ChronoLocalDateTime<D>, ChronoZonedDateTime<D>
- All Known Implementing Classes:
Instant, LocalDate, LocalDateTime, LocalTime, OffsetDateTime, ZonedDateTime
A date, a time or a moment that can be moved by an amount of time and
measured against another of its kind.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisSupported(TemporalUnit unit) Whether this value can add or subtractunit.default Temporalminus(long amountToSubtract, TemporalUnit unit) This value moved back byamountToSubtractofunit.default Temporalminus(TemporalAmount amount) This value moved back byamount.plus(long amountToAdd, TemporalUnit unit) This value moved forward byamountToAddofunit.default Temporalplus(TemporalAmount amount) This value moved forward byamount.longuntil(Temporal endExclusive, TemporalUnit unit) The whole units ofunitfrom this value toendExclusive.
-
Method Details
-
isSupported
Whether this value can add or subtractunit. -
plus
This value moved forward byamountToAddofunit. -
minus
This value moved back byamountToSubtractofunit. -
plus
This value moved forward byamount. -
minus
This value moved back byamount. -
until
The whole units ofunitfrom this value toendExclusive.
-