Package nz.org.riskscape.engine.function
Interface FunctionResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Used for realizing FunctionCall
expressions to produce a RiskscapeFunction
that can be used during
execution of RealizedExpression.evaluate(Object)
.
-
Method Summary
Modifier and TypeMethodDescriptionresolve
(RealizationContext context, FunctionCall functionCall, Type inputType, List<Type> argumentTypes, IdentifiedFunction function) Attempt to resolve a function against the given criteria.
-
Method Details
-
resolve
ResultOrProblems<RiskscapeFunction> resolve(RealizationContext context, FunctionCall functionCall, Type inputType, List<Type> argumentTypes, IdentifiedFunction function) Attempt to resolve a function against the given criteria.
- Parameters:
context
- the context in which the function is being resolved, realized and eventually executedfunctionCall
- the expression that is being matchedinputType
- the type that the expression is being evaluated againstargumentTypes
- the evaluated types that the function call should expectfunction
- the function that was found. This will typically be returned unmolested or adapted in some way so that it will accept the given input types.- Returns:
- a function that should work with the given inputs, or a failed
ResultOrProblems
if noRiskscapeFunction
could be resolved
-