|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.client.soda.ExpressionBase
com.espertech.esper.client.soda.CaseSwitchExpression
public class CaseSwitchExpression
Case-expression that acts as a switch testing a value against other values.
The first child expression provides the value to switch on. The following pairs of child expressions provide the "when expression then expression" results. The last child expression provides the "else" result.
Constructor Summary | |
---|---|
CaseSwitchExpression()
Ctor - for use to create an expression tree, without inner expression |
|
CaseSwitchExpression(Expression switchValue)
Ctor. |
Method Summary | |
---|---|
CaseSwitchExpression |
add(Expression when,
Expression then)
Adds a pair of expressions representing a "when" and a "then" in the switch. |
ExpressionPrecedenceEnum |
getPrecedence()
Returns precedence. |
CaseSwitchExpression |
setElse(Expression elseExpr)
Sets the else-part of the case-switch. |
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 |
---|
public CaseSwitchExpression()
public CaseSwitchExpression(Expression switchValue)
switchValue
- is the expression providing the value to switch onMethod Detail |
---|
public CaseSwitchExpression add(Expression when, Expression then)
when
- expression to match onthen
- expression to return a conditional result when the when-expression matches
public CaseSwitchExpression setElse(Expression elseExpr)
elseExpr
- is the expression returning the no-match value
public ExpressionPrecedenceEnum getPrecedence()
Expression
public void toPrecedenceFreeEPL(java.io.StringWriter writer)
ExpressionBase
toPrecedenceFreeEPL
in class ExpressionBase
writer
- is the output to use
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |