Interface ChronoFunction<T,​R>

Type Parameters:
T - generic type of source
R - generic type of result
All Superinterfaces:
Function<T,​R>

public interface ChronoFunction<T,​R> extends Function<T,​R>

Represents any temporal query using the strategy pattern approach.

Author:
Meno Hochschild
See Also:
ChronoEntity.get(ChronoFunction)
  • Method Summary

    Modifier and Type
    Method
    Description
    apply​(T context)
    Reads and evaluates given time value context to a specific result of type R.

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Method Details

    • apply

      R apply(T context)

      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 yield null or throw an exception in case of undefined results.

      Specified by:
      apply in interface Function<T,​R>
      Parameters:
      context - time context to be evaluated
      Returns:
      result of query or null if undefined
      Throws:
      ChronoException - if this query is not executable