|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.el.Expression
org.apache.commons.el.ConditionalExpression
public class ConditionalExpression
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?)
Constructor Summary | |
---|---|
ConditionalExpression(Expression pCondition,
Expression pTrueBranch,
Expression pFalseBranch)
Constructor |
Method Summary | |
---|---|
Expression |
bindFunctions(javax.servlet.jsp.el.FunctionMapper functions)
Returns an expression with all FunctionInvocation s replaced by
BoundFunctionInvocation s. |
Object |
evaluate(javax.servlet.jsp.el.VariableResolver vr,
javax.servlet.jsp.el.FunctionMapper f)
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConditionalExpression(Expression pCondition, Expression pTrueBranch, Expression pFalseBranch)
Method Detail |
---|
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 String getExpressionString()
getExpressionString
in class Expression
public Object evaluate(javax.servlet.jsp.el.VariableResolver vr, javax.servlet.jsp.el.FunctionMapper f) throws javax.servlet.jsp.el.ELException
evaluate
in class Expression
javax.servlet.jsp.el.ELException
public Expression bindFunctions(javax.servlet.jsp.el.FunctionMapper functions) throws javax.servlet.jsp.el.ELException
Expression
FunctionInvocation
s replaced by
BoundFunctionInvocation
s.
bindFunctions
in class Expression
functions
- the functions to use in this transformation
FunctionInvocation
s replaced by
BoundFunctionInvocation
s.
javax.servlet.jsp.el.ELException
- if any of the functions in this Expression
are
not present in functions
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |