public abstract class AbstractExpression<T> extends Object implements Expression<T>
Modifier | Constructor and Description |
---|---|
protected |
AbstractExpression(Operator op)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected List<Expression> |
defaultMerge(Expression left,
Expression right)
Base merge implementation.
|
T |
getLeftOperand()
Get the left operand expression.
|
Operator |
getOperator()
Get the expression operator.
|
T |
getRightOperand()
Get the right operand expression.
|
List<Expression> |
merge(Expression left,
Expression right,
int precedence)
Merge expression with surrounding expressions.
|
void |
setLeftOperand(T left)
Set the expressions left operand.
|
void |
setRightOperand(T right)
Set the expressions right operand.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toPredicate
protected AbstractExpression(Operator op)
op
- the expressions operatorpublic void setLeftOperand(T left)
Expression
setLeftOperand
in interface Expression<T>
left
- the left operandpublic void setRightOperand(T right)
Expression
setRightOperand
in interface Expression<T>
right
- the right operandpublic T getLeftOperand()
Expression
getLeftOperand
in interface Expression<T>
public T getRightOperand()
Expression
getRightOperand
in interface Expression<T>
public Operator getOperator()
Expression
getOperator
in interface Expression<T>
public List<Expression> merge(Expression left, Expression right, int precedence)
Expression
merge
in interface Expression<T>
left
- the preceding expressionright
- the following expressionprecedence
- the precedence level being merged. Only expressions at this precedence level
should be merged. Others should simply return the left expression, themselves and
the right expression in that order.protected List<Expression> defaultMerge(Expression left, Expression right)
left
- the expression to the left of this expressionright
- the expression to the right of this expressionCopyright © 2022 Apache Software Foundation. All rights reserved.