Class InExpression
java.lang.Object
com.espertech.esper.common.client.soda.ExpressionBase
com.espertech.esper.common.client.soda.InExpression
- All Implemented Interfaces:
Expression
,Serializable
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 Summary
ConstructorDescriptionCtor.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, Object... parameters) Ctor - for use to create an expression tree, without child expression. -
Method Summary
Modifier and TypeMethodDescriptionadd
(Expression expression) Add an expression to include in the computation.Add a constant to include in the computation.Add a property to include in the computation.boolean
getNotIn()
Returns true for the not-in expression, or false for an in-expression.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
(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.common.client.soda.ExpressionBase
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
-
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
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 setisNotIn
- true for the not-in expression, false for the in-expressionparameters
- is a set of constants to match against
-
InExpression
Ctor.- Parameters:
value
- expression to checkisNotIn
- 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
Add a constant to include in the computation.- Parameters:
object
- constant to add- Returns:
- expression
-
add
Add an expression to include in the computation.- Parameters:
expression
- to add- Returns:
- expression
-
add
Add a property to include in the computation.- Parameters:
propertyName
- is the name of the property- Returns:
- expression
-
getPrecedence
Description copied from interface:Expression
Returns precedence.- Returns:
- precedence
-
toPrecedenceFreeEPL
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 classExpressionBase
- Parameters:
writer
- is the output to use
-