Package net.time4j.engine
Interface ChronoFunction<T,R>
- Type Parameters:
T- generic type of sourceR- generic type of result
- All Superinterfaces:
Function<T,R>
Represents any temporal query using the strategy pattern approach.
- Author:
- Meno Hochschild
- See Also:
ChronoEntity.get(ChronoFunction)
-
Method Summary
-
Method Details
-
apply
Reads and evaluates given time value context to a specific result of type R.
Will be called by
ChronoEntity.get(ChronoFunction). Concrete implementations must document if they rather yieldnullor throw an exception in case of undefined results.- Specified by:
applyin interfaceFunction<T,R>- Parameters:
context- time context to be evaluated- Returns:
- result of query or
nullif undefined - Throws:
ChronoException- if this query is not executable
-