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?)
Modifier and Type | Field | Description |
---|---|---|
(package private) Expression |
mCondition |
|
(package private) Expression |
mFalseBranch |
|
(package private) Expression |
mTrueBranch |
Constructor | Description |
---|---|
ConditionalExpression(Expression pCondition,
Expression pTrueBranch,
Expression pFalseBranch) |
Constructor
|
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object |
evaluate(javax.servlet.jsp.el.VariableResolver vr,
javax.servlet.jsp.el.FunctionMapper f,
Logger l) |
Evaluates the conditional expression and returns the literal result
|
Expression |
getCondition() |
|
java.lang.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) |
Expression mCondition
Expression mTrueBranch
Expression mFalseBranch
public ConditionalExpression(Expression pCondition, Expression pTrueBranch, Expression pFalseBranch)
public Expression getCondition()
public void setCondition(Expression pCondition)
public Expression getTrueBranch()
public void setTrueBranch(Expression pTrueBranch)
public Expression getFalseBranch()
public void setFalseBranch(Expression pFalseBranch)
public java.lang.String getExpressionString()
getExpressionString
in class Expression
public java.lang.Object evaluate(javax.servlet.jsp.el.VariableResolver vr, javax.servlet.jsp.el.FunctionMapper f, Logger l) throws javax.servlet.jsp.el.ELException
evaluate
in class Expression
javax.servlet.jsp.el.ELException
Copyright (c) 2001-2002 - Apache Software Foundation