public class CaseWhenThenExpression extends ExpressionBase
Constructor and Description |
---|
CaseWhenThenExpression()
Ctor - for use to create an expression tree, without child expression.
|
Modifier and Type | Method and Description |
---|---|
CaseWhenThenExpression |
add(Expression when,
Expression then)
Adds a when-then pair of expressions.
|
ExpressionPrecedenceEnum |
getPrecedence()
Returns precedence.
|
CaseWhenThenExpression |
setElse(Expression elseExpr)
Sets the expression to provide a value when no when-condition matches.
|
void |
toPrecedenceFreeEPL(StringWriter writer)
Renders the expressions and all it's child expression, in full tree depth, as a string in
language syntax.
|
addChild, getChildren, getTreeObjectName, renderAggregation, setChildren, setTreeObjectName, toEPL, toPrecedenceFreeEPL, toPrecedenceFreeEPL
public CaseWhenThenExpression()
Use add methods to add child expressions to acts upon.
public CaseWhenThenExpression add(Expression when, Expression then)
when
- providings conditions to evaluatethen
- provides the result when a condition evaluates to truepublic CaseWhenThenExpression setElse(Expression elseExpr)
elseExpr
- expression providing default resultpublic ExpressionPrecedenceEnum getPrecedence()
Expression
public void toPrecedenceFreeEPL(StringWriter writer)
ExpressionBase
toPrecedenceFreeEPL
in class ExpressionBase
writer
- is the output to use