public abstract class BinaryExpression extends Expression
| 限定符和类型 | 字段和说明 |
|---|---|
protected Expression |
left |
protected Expression |
right |
| 构造器和说明 |
|---|
BinaryExpression() |
| 限定符和类型 | 方法和说明 |
|---|---|
Class |
getExpectedReturnType(Query q)
Return the expected return type from this expression.
|
Expression |
getLeft()
Get the LHS.
|
Expression |
getRight()
Get the RHS.
|
Object |
getValue(Object o,
Query q)
Get the value of this expression.
|
boolean |
hasFixedResult(Query q)
Return whether the expression will evaluate to a fixed/constant result.
|
void |
init(Query q)
Init the expression.
|
void |
setLeft(Expression exp) |
void |
setRight(Expression exp) |
isBracketed, isTrue, setBracketed, toStringprotected Expression left
protected Expression right
public boolean hasFixedResult(Query q)
ExpressionExpression.isTrue(Object,Query) or Expression.getValue(Object,Query)
methods will return the same object (or that o1.equals (o2) == true)
regardless of the object passed to the method.hasFixedResult 在类中 Expressionq - The Query object.true if the expression evaluates to a fixed/constant result.public Class getExpectedReturnType(Query q)
getExpectedReturnType 在类中 Expressionq - The Query object.Boolean.class.public void init(Query q) throws QueryParseException
Expression.init(Query) on the LHS and RHS (if present) of the
expression.init 在类中 Expressionq - The Query object.QueryParseException - If the LHS and/or RHS cannot be inited.public Object getValue(Object o, Query q) throws QueryExecutionException
java.lang.Boolean created as the result of a call to:
Expression.getValue(Object,Query).getValue 在类中 Expressiono - The object to evaluate the expression on.q - The Query object.QueryExecutionException - If the expression cannot be evaluated.public Expression getRight()
public Expression getLeft()
public void setLeft(Expression exp)
public void setRight(Expression exp)
Copyright © 2021. All rights reserved.