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, waittoPredicateprotected AbstractExpression(Operator op)
op - the expressions operatorpublic void setLeftOperand(T left)
ExpressionsetLeftOperand in interface Expression<T>left - the left operandpublic void setRightOperand(T right)
ExpressionsetRightOperand in interface Expression<T>right - the right operandpublic T getLeftOperand()
ExpressiongetLeftOperand in interface Expression<T>public T getRightOperand()
ExpressiongetRightOperand in interface Expression<T>public Operator getOperator()
ExpressiongetOperator in interface Expression<T>public List<Expression> merge(Expression left, Expression right, int precedence)
Expressionmerge 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.