public class BooleanExpression extends ValueExpression
true
or false
.Constructor and Description |
---|
BooleanExpression() |
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(Object o,
Query q)
Get the value of this boolean.
|
Class |
getExpectedReturnType(Query q)
Get the expected return type.
|
Object |
getValue(Object o,
Query q)
Get the value of this boolean.
|
boolean |
hasFixedResult(Query q)
Always returns
true since it represents a constant. |
void |
init(Query q)
Init this expression.
|
boolean |
isTrue(Object o,
Query q)
Returns whether this expression is
true or false . |
void |
setValue(Boolean b) |
String |
toString()
Returns a string version of this expression.
|
isBracketed, setBracketed
public boolean hasFixedResult(Query q)
true
since it represents a constant.hasFixedResult
in class Expression
q
- The Query object.true
always.public String toString()
toString
in class Expression
public Class getExpectedReturnType(Query q)
getExpectedReturnType
in class Expression
q
- The Query object.java.lang.Boolean.TYPE
.public void init(Query q)
init
in class Expression
q
- The Query object.public void setValue(Boolean b)
public boolean isTrue(Object o, Query q)
true
or false
.isTrue
in class Expression
o
- The current object, not used in this method.q
- The Query object, not used in this method.public Object getValue(Object o, Query q)
getValue
in class ValueExpression
o
- The current object, not used in this method.q
- The Query object, not used in this method.public Object evaluate(Object o, Query q)
evaluate
in class ValueExpression
o
- The current object, not used in this method.q
- The Query object, not used in this method.