Interface FirstOrderFunctionCall<RETURN extends Value>

    • Method Detail

      • evaluate

        RETURN evaluate​(EvaluationContext context,
                        Optional<EvaluationContext> mdpContext,
                        AttributeValue... remainingArgs)
                 throws IndeterminateEvaluationException
        Make the call in a given evaluation context and argument values resolved at evaluation time. This method is called by evaluate(EvaluationContext, Optional, boolean, AttributeValue...) after checking evaluation-time args.
        Parameters:
        context - Individual Decision evaluation context
        mdpContext - the context of the Multiple Decision request that the context belongs to if the Multiple Decision Profile is used
        remainingArgs - remaining args (not yet known at initialization time). Null if none. Only non-bag/primitive values are valid remainingArgs to prevent varargs warning (potential heap pollution via varargs parameter) that would be caused by using a parameterized type such as Value/Collection to represent both bags and primitives.
        Returns:
        result of the call
        Throws:
        IndeterminateEvaluationException - if any error evaluating the function
      • evaluate

        RETURN evaluate​(EvaluationContext context,
                        Optional<EvaluationContext> mdpContext,
                        boolean checkRemainingArgTypes,
                        AttributeValue... remainingArgs)
                 throws IndeterminateEvaluationException
        Make the call in a given evaluation context. This method calls the function after checking remainingArgTypes if checkremainingArgTypes = true
        Parameters:
        context - Individual Decision evaluation context
        mdpContext - the context of the Multiple Decision request that the context belongs to if the Multiple Decision Profile is used
        checkRemainingArgTypes - whether to check types of remainingArgs. It is strongly recommended setting this to true always, unless you have already checked the types are OK before calling this method and want to skip re-checking for efficiency.
        remainingArgs - remaining args.
        Returns:
        result of the call
        Throws:
        IndeterminateEvaluationException - if checkremainingArgTypes = true and remainingArgs do not check OK, or if they do but there was an error evaluating the function with such arguments