public class ConditionalExpr extends Expr
Constructor and Description |
---|
ConditionalExpr(Expr test,
Expr trueExpr,
Expr falseExpr)
Creates the conditional expression.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
Returns true for equal strings.
|
boolean |
evalBoolean(ELContext env)
Evaluate the expression as a boolean
|
double |
evalDouble(ELContext env)
Evaluate the expression as a double
|
long |
evalLong(ELContext env)
Evaluate the expression as a long
|
java.lang.String |
evalString(ELContext env)
Evaluate the expression as a string
|
java.lang.Object |
getValue(ELContext env)
Evaluate the expression as an object.
|
boolean |
isConstant()
Returns true if this is a constant expression.
|
void |
printCreate(WriteStream os)
Prints the Java code to recreate the expr
|
java.lang.String |
toString()
Returns a readable representation of the expr.
|
coerceToType, createField, createField, createMethod, error, evalBigDecimal, evalBigInteger, evalCharacter, evalObject, evalPeriod, evalStringWithNull, getExpectedType, getExpressionString, getMethodInfo, getType, hashCode, invocationError, invoke, isDouble, isDoubleString, isLiteralText, isReadOnly, print, print, printEscaped, printEscapedString, setProperty, setValue, toBigDecimal, toBigInteger, toBoolean, toCharacter, toClass, toDouble, toEnum, toLong, toStream, toStream, toStream, toStreamEscaped, toStreamEscaped, toStreamEscaped, toString, toString, toString, toString, toString, toStringWithNull
getValueReference
public boolean isConstant()
isConstant
in class Expr
public java.lang.Object getValue(ELContext env) throws ELException
getValue
in class Expr
env
- the variable environmentELException
public long evalLong(ELContext env) throws ELException
evalLong
in class Expr
env
- the variable environmentELException
public double evalDouble(ELContext env) throws ELException
evalDouble
in class Expr
env
- the variable environmentELException
public java.lang.String evalString(ELContext env) throws ELException
evalString
in class Expr
env
- the variable environmentELException
public boolean evalBoolean(ELContext env) throws ELException
evalBoolean
in class Expr
env
- the variable environmentELException
public void printCreate(WriteStream os) throws java.io.IOException
printCreate
in class Expr
os
- the output stream to the *.java filejava.io.IOException
public boolean equals(java.lang.Object o)