|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.josql.expressions.Expression org.josql.expressions.ValueExpression org.josql.expressions.BooleanExpression
public class BooleanExpression
This class represents a "boolean" expression, either true
or false
.
Constructor Summary | |
---|---|
BooleanExpression()
|
Method Summary | |
---|---|
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. |
Methods inherited from class org.josql.expressions.Expression |
---|
isBracketed, setBracketed |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BooleanExpression()
Method Detail |
---|
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |