public class BooleanExpression extends ValueExpression
true
or false
.Constructor and Description |
---|
BooleanExpression() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
evaluate(java.lang.Object o,
Query q)
Get the value of this boolean.
|
java.lang.Class |
getExpectedReturnType(Query q)
Get the expected return type.
|
java.lang.Object |
getValue(java.lang.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(java.lang.Object o,
Query q)
Returns whether this expression is
true or false . |
void |
setValue(java.lang.Boolean b) |
java.lang.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 java.lang.String toString()
toString
in class Expression
public java.lang.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(java.lang.Boolean b)
public boolean isTrue(java.lang.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 java.lang.Object getValue(java.lang.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 java.lang.Object evaluate(java.lang.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.