Class ConstantExpression<V extends Value>

    • Field Detail

      • alwaysPresentValue

        protected final Optional<V extends Value> alwaysPresentValue
    • Method Detail

      • getReturnType

        public final Datatype<V> getReturnType()
        Description copied from interface: Expression
        Gets the expected return type of the expression if evaluated.
        Specified by:
        getReturnType in interface Expression<V extends Value>
        Returns:
        expression evaluation's return type
      • evaluate

        public final V evaluate​(EvaluationContext context)
        Returns the value itself
        Specified by:
        evaluate in interface Expression<V extends Value>
        Parameters:
        context - the representation of the request
        Returns:
        the result of evaluation that may be a single value T (e.g. function result, AttributeValue, Condition, Match...) or bag of values (e.g. AttributeDesignator, AttributeSelector)
      • getValue

        public final Optional<V> getValue()
        Returns the constant underlying value (always present)
        Specified by:
        getValue in interface Expression<V extends Value>
        Returns:
        the constant value iff the expression has a static/fixed/constant value, else no present value. NB: Null is not considered/possible as a constant value for expressions.