public static class Expression.DyadicOperator extends Expression.Operator
precedence, symbol
Constructor and Description |
---|
DyadicOperator(String symbol,
int precedence,
boolean isAssociative)
Dyadic operator
|
Modifier and Type | Method and Description |
---|---|
boolean |
isHigherThanLeftSide(Expression.Operator op)
Checks if this operation is higher than operator
op in left side of the expression |
boolean |
isHigherThanRightSide(Expression.Operator op)
Checks if this operation is higher than operator
op in right side of the expression |
toString
public DyadicOperator(String symbol, int precedence, boolean isAssociative)
symbol
- the source text or symbol of an operator. e.g =, ==, +, /, >, <, etcprecedence
- the order of precedence where the expression is compiledisAssociative
- true if associative operator. An associative operator is one for which
parentheses can be inserted and removed without changing the meaning of the expressionpublic boolean isHigherThanLeftSide(Expression.Operator op)
op
in left side of the expressionop
- the operator in the left side of the expressionop
in left side of the expressionpublic boolean isHigherThanRightSide(Expression.Operator op)
op
in right side of the expressionop
- the operator in the right side of the expressionop
in right side of the expressionCopyright © 2019. All rights reserved.