com.espertech.esper.client.soda
Class InExpression

java.lang.Object
  extended by com.espertech.esper.client.soda.ExpressionBase
      extended by com.espertech.esper.client.soda.InExpression
All Implemented Interfaces:
Expression, java.io.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:
Serialized Form

Constructor Summary
InExpression()
          Ctor.
InExpression(boolean isNotIn)
          Ctor - for use to create an expression tree, without child expression.
InExpression(Expression value, boolean isNotIn, Expression[] parameters)
          Ctor.
InExpression(Expression value, boolean isNotIn, java.lang.Object... parameters)
          Ctor - for use to create an expression tree, without child expression.
 
Method Summary
 InExpression add(Expression expression)
          Add an expression to include in the computation.
 InExpression add(java.lang.Object object)
          Add a constant to include in the computation.
 InExpression add(java.lang.String propertyName)
          Add a property to include in the computation.
 boolean getNotIn()
          Returns true for the not-in expression, or false for an in-expression.
 ExpressionPrecedenceEnum getPrecedence()
          Returns precedence.
 boolean isNotIn()
          Returns true for the not-in expression, or false for an in-expression.
 void setNotIn(boolean notIn)
          Set to true to indicate this is a not-in expression.
 void toPrecedenceFreeEPL(java.io.StringWriter writer)
          Renders the expressions and all it's child expression, in full tree depth, as a string in language syntax.
 
Methods inherited from class com.espertech.esper.client.soda.ExpressionBase
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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,
                    java.lang.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 Detail

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(java.lang.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(java.lang.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(java.io.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

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com