Interface ChronoOperator<T>

Type Parameters:
T - generic type of entities this operator can be applied to
All Superinterfaces:
Function<T,​T>, UnaryOperator<T>
All Known Implementing Classes:
ElementOperator, Month, Quarter, StdOperator, Weekday

public interface ChronoOperator<T> extends UnaryOperator<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.

Author:
Meno Hochschild
  • Method Summary

    Modifier and Type
    Method
    Description
    apply​(T entity)
    Adjusts given entity and yields a changed copy of argument.

    Methods inherited from interface java.util.function.Function

    andThen, compose