Class LiteralExpression

  • All Implemented Interfaces:
    Expression

    public class LiteralExpression
    extends java.lang.Object
    implements Expression
    Simple literal value, that does not depend on other expressions.
    Since:
    5705
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object literal  
    • Constructor Summary

      Constructors 
      Constructor Description
      LiteralExpression​(java.lang.Object literal)
      Constructs a new LiteralExpression.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object evaluate​(Environment env)
      Evaluate this expression.
      java.lang.Object getLiteral()
      Returns the literal.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • literal

        private final java.lang.Object literal
    • Constructor Detail

      • LiteralExpression

        public LiteralExpression​(java.lang.Object literal)
        Constructs a new LiteralExpression.
        Parameters:
        literal - literal
    • Method Detail

      • getLiteral

        public final java.lang.Object getLiteral()
        Returns the literal.
        Returns:
        the literal
        Since:
        14484
      • evaluate

        public java.lang.Object evaluate​(Environment env)
        Description copied from interface: Expression
        Evaluate this expression.
        Specified by:
        evaluate in interface Expression
        Parameters:
        env - The environment
        Returns:
        the result of the evaluation, can be a List, String or any primitive type or wrapper classes of a primitive type.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object