Class ConstantExpression

java.lang.Object
com.espertech.esper.common.client.soda.ExpressionBase
com.espertech.esper.common.client.soda.ConstantExpression
All Implemented Interfaces:
Expression, Serializable

public class ConstantExpression extends ExpressionBase
Constant value returns a fixed value for use in expressions.
See Also:
  • Constructor Details

    • ConstantExpression

      public ConstantExpression()
      Ctor.
    • ConstantExpression

      public ConstantExpression(Object constant)
      Ctor.
      Parameters:
      constant - is the constant value, or null to represent the null value
    • ConstantExpression

      public ConstantExpression(Object constant, String constantType)
      Ctor.
      Parameters:
      constant - value
      constantType - type
  • Method Details

    • getConstantType

      public String getConstantType()
      Returns the type of the constant.
      Returns:
      type
    • setConstantType

      public void setConstantType(String constantType)
      Sets the type of the constant.
      Parameters:
      constantType - type
    • getPrecedence

      public ExpressionPrecedenceEnum getPrecedence()
      Description copied from interface: Expression
      Returns precedence.
      Returns:
      precedence
    • toPrecedenceFreeEPL

      public void toPrecedenceFreeEPL(StringWriter writer)
      Description copied from class: ExpressionBase
      Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.
      Specified by:
      toPrecedenceFreeEPL in class ExpressionBase
      Parameters:
      writer - is the output to use
    • getConstant

      public Object getConstant()
      Returns the constant value that the expression represents.
      Returns:
      value of constant
    • setConstant

      public void setConstant(Object constant)
      Sets the constant value that the expression represents.
      Parameters:
      constant - is the value, or null to indicate the null value