T - generic type of entities this operator can be applied topublic interface ChronoOperator<T>
Applies a functional calculation on chronological entities and yields the result as changed copy.
Technical note: This interface is only suitable in an
Java-pre8-environment (that is Java 6 + 7) if the type T is constrained
to a final type. Otherwise the compiler will fail when compiling
expressions like entity.with(operator) due to limited support
of type inference. This constraint does not exist with Java 8 and later.
| Modifier and Type | Method and Description |
|---|---|
T |
apply(T entity)
Adjusts given entity and yields a changed copy of argument.
|
T apply(T entity)
Adjusts given entity and yields a changed copy of argument.
Will be called by ChronoEntity.with(ChronoOperator).
entity - chronological entity to be adjustedChronoException - if there is no element rule for adjustingjava.lang.IllegalArgumentException - if any invalid value is triedjava.lang.ArithmeticException - in case of numerical overflow