Class InExpression

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

public class InExpression extends ExpressionBase
In-expresson checks that a value is in (or not in) a set of values, equivalent to the syntax "color in ('red', 'blue')".
See Also:
  • Constructor Details

    • InExpression

      public InExpression()
      Ctor.
    • InExpression

      public InExpression(boolean isNotIn)
      Ctor - for use to create an expression tree, without child expression.

      Use add methods to add child expressions to acts upon.

      Parameters:
      isNotIn - true for the not-in expression, false for the in-expression
    • InExpression

      public InExpression(Expression value, boolean isNotIn, Object... parameters)
      Ctor - for use to create an expression tree, without child expression.

      Use add methods to add child expressions to acts upon.

      Parameters:
      value - an expression that provides the value to search for in the set
      isNotIn - true for the not-in expression, false for the in-expression
      parameters - is a set of constants to match against
    • InExpression

      public InExpression(Expression value, boolean isNotIn, Expression[] parameters)
      Ctor.
      Parameters:
      value - expression to check
      isNotIn - indicator whether not-in (true) or in (false)
      parameters - expression list
  • Method Details

    • isNotIn

      public boolean isNotIn()
      Returns true for the not-in expression, or false for an in-expression.
      Returns:
      true for not-in
    • getNotIn

      public boolean getNotIn()
      Returns true for the not-in expression, or false for an in-expression.
      Returns:
      true for not-in
    • setNotIn

      public void setNotIn(boolean notIn)
      Set to true to indicate this is a not-in expression.
      Parameters:
      notIn - true for not-in, false for in-expression
    • add

      public InExpression add(Object object)
      Add a constant to include in the computation.
      Parameters:
      object - constant to add
      Returns:
      expression
    • add

      public InExpression add(Expression expression)
      Add an expression to include in the computation.
      Parameters:
      expression - to add
      Returns:
      expression
    • add

      public InExpression add(String propertyName)
      Add a property to include in the computation.
      Parameters:
      propertyName - is the name of the property
      Returns:
      expression
    • 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