org.apache.commons.el
public class ConditionalExpression extends Expression
Represents a conditional expression. I've decided not to produce an abstract base "TernaryOperatorExpression" class since (a) future ternary operators are unlikely and (b) it's not clear that there would be a meaningful way to abstract them. (For instance, would they all be right- associative? Would they all have two fixed operator symbols?)
Field Summary | |
---|---|
Expression | mCondition |
Expression | mFalseBranch |
Expression | mTrueBranch |
Constructor Summary | |
---|---|
ConditionalExpression(Expression pCondition, Expression pTrueBranch, Expression pFalseBranch)
Constructor
|
Method Summary | |
---|---|
Object | evaluate(VariableResolver vr, FunctionMapper f, Logger l)
Evaluates the conditional expression and returns the literal result
|
Expression | getCondition() |
String | getExpressionString()
Returns the expression in the expression language syntax
|
Expression | getFalseBranch() |
Expression | getTrueBranch() |
void | setCondition(Expression pCondition) |
void | setFalseBranch(Expression pFalseBranch) |
void | setTrueBranch(Expression pTrueBranch) |