Class Expressions


  • public final class Expressions
    extends Object
    This class consists exclusively of constants and static methods to operate on Expressions.
    • Method Detail

      • eval

        public static <V extends Value> V eval​(Expression<?> arg,
                                               EvaluationContext context,
                                               Optional<EvaluationContext> mdpContext,
                                               Datatype<V> returnType)
                                        throws IndeterminateEvaluationException
        Evaluate single-valued (primitive) argument expression
        Parameters:
        arg - argument expression
        context - Individual Decision context in which argument expression is evaluated
        mdpContext - the context of the Multiple Decision request that the context belongs to if the Multiple Decision Profile is used.
        returnType - type of returned attribute value
        Returns:
        result of evaluation
        Throws:
        IndeterminateEvaluationException - if no value returned from evaluation, or returnType is not a supertype of the result value datatype
      • evalPrimitive

        public static AttributeValue evalPrimitive​(Expression<?> arg,
                                                   EvaluationContext context,
                                                   Optional<EvaluationContext> mdpContext)
                                            throws IndeterminateEvaluationException
        Evaluate single-valued (primitive) argument expression
        Parameters:
        arg - argument expression
        context - Individual Decision context in which argument expression is evaluated
        mdpContext - the context of the Multiple Decision request that the context belongs to if the Multiple Decision Profile is used
        Returns:
        result of evaluation
        Throws:
        IndeterminateEvaluationException - if no value returned from evaluation, or returnType is not a supertype of the result value datatype