public abstract class BooleanOperation extends Object implements Expression
Modifier and Type | Field and Description |
---|---|
protected Expression |
leftExpression |
protected Expression |
rightExpression |
Constructor and Description |
---|
BooleanOperation(Expression leftExpression,
Expression rightExpression)
Creates a new operation for the given operands.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
eval(Expression expr,
LocalRenderContext ctx)
Evaluates the operation into a boolean.
|
Class<?> |
getType()
Returns the Java class of the objects yielded by this expression.
|
Expression |
propagateVisitor(ExpressionVisitor visitor)
Visits all child nodes and then the node itself.
|
Expression |
reduce()
Reduces and optimizes the expression if possible.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
copy, eval, isConstant
protected Expression leftExpression
protected Expression rightExpression
public BooleanOperation(Expression leftExpression, Expression rightExpression)
leftExpression
- the left operand which must be a boolean expressionrightExpression
- the right operand which must be a boolean expressionpublic Expression propagateVisitor(ExpressionVisitor visitor)
Expression
propagateVisitor
in interface Expression
visitor
- the visitor to invoke for all child nodes and on the node itselfpublic Expression reduce()
Expression
reduce
in interface Expression
protected boolean eval(Expression expr, LocalRenderContext ctx)
expr
- the expression to evaluatectx
- the context used for the evaluationpublic Class<?> getType()
Expression
getType
in interface Expression
Copyright © 2018. All rights reserved.