T
- Return value Java typepublic interface Function<T>
FunctionPrototype
(or FunctionPrototypes
) so to
properly declare the function prototype.Modifier and Type | Method | Description |
---|---|---|
UpscalableIterator<T> |
evaluate(Interval interval,
ExecutorContext context,
net.vleo.timel.impl.upscaler.Upscaler<T> upscaler,
net.vleo.timel.impl.downscaler.Downscaler<T> downscaler,
net.vleo.timel.impl.target.Evaluable<?>... arguments) |
Evaluates the function.
|
static <T> UpscalableIterator<T>[] |
evaluateAll(Interval interval,
ExecutorContext context,
net.vleo.timel.impl.target.Evaluable<? extends T>... arguments) |
Convenience function to evaluate all the given arguments for the same interval and context.
|
default Optional<Type> |
resolveReturnType(Type proposed,
Map<String,Type> variables,
Type... argumentTypes) |
Helps the compiler to resolve the return type for a possible function call candidate.
|
default Optional<Type<?>> |
specializeVariableTemplate(String variable,
TemplateType template,
Type<?>... argumentTypes) |
Binds a variable to a template specialization when dealing with template types.
|
default Optional<Type<?>> specializeVariableTemplate(String variable, TemplateType template, Type<?>... argumentTypes)
The default implementation allows variables to bind only to a particular template specialization, if matched by all occurrences.
By overriding this method, one can change the default behavior so to accept different templates specializations.
variable
- Variable name to specializetemplate
- Template type to specializeargumentTypes
- List of argument typesdefault Optional<Type> resolveReturnType(Type proposed, Map<String,Type> variables, Type... argumentTypes)
The default implementation is to return empty, which will make the function a non match.
proposed
- The return value guessed so farvariables
- A map of the variable types resolvedargumentTypes
- All argument typesUpscalableIterator<T> evaluate(Interval interval, ExecutorContext context, net.vleo.timel.impl.upscaler.Upscaler<T> upscaler, net.vleo.timel.impl.downscaler.Downscaler<T> downscaler, net.vleo.timel.impl.target.Evaluable<?>... arguments)
interval
- Evaluation intervalcontext
- Executor contextupscaler
- Result upscaler. This one is provided to be coherent with the expected return type.downscaler
- Result downscaler. This one is provided to be coherent with the expected return type.arguments
- List of arguments to evaluate.static <T> UpscalableIterator<T>[] evaluateAll(Interval interval, ExecutorContext context, net.vleo.timel.impl.target.Evaluable<? extends T>... arguments)
T
- Expected return value Java typeinterval
- Evaluation intervalcontext
- Evaluation contextarguments
- Arguments to evaluateCopyright © 2019. All rights reserved.