public interface CalendricalObject extends CalendricalAdjuster
Modifier and Type | Method and Description |
---|---|
<T> T |
extract(java.lang.Class<T> type)
Extracts an instance of the specified type.
|
CalendricalObject |
with(CalendricalAdjuster calendrical)
Returns a copy of this calendrical with the specified calendrical set.
|
<T> T extract(java.lang.Class<T> type)
An implementation must return the following types if it contains sufficient information:
T
- the type to extracttype
- the type to extract, null returns nullCalendricalObject with(CalendricalAdjuster calendrical)
This allows the manipulation of a calendrical in a general way.
For example, if this calendrical is a LocalDateTime
and the specified calendrical
is a LocalDate
, then the implementation will return a new LocalDateTime
with the date changed.
An implementation must handle the following types if possible:
calendrical
- the calendrical to set into this calendrical, null returns nullCalendricalException
- if unable to set the calendrical into this calendrical