Package org.datanucleus.query.expression
Class Expression.DyadicOperator
- java.lang.Object
-
- org.datanucleus.query.expression.Expression.Operator
-
- org.datanucleus.query.expression.Expression.DyadicOperator
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- Expression
public static class Expression.DyadicOperator extends Expression.Operator
"Dyadic" operator performs operation on one or two operands.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.datanucleus.query.expression.Expression.Operator
precedence, symbol
-
-
Constructor Summary
Constructors Constructor Description DyadicOperator(String symbol, int precedence, boolean isAssociative)Dyadic operator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisHigherThanLeftSide(Expression.Operator op)Checks if this operation is higher than operatoropin left side of the expressionbooleanisHigherThanRightSide(Expression.Operator op)Checks if this operation is higher than operatoropin right side of the expression-
Methods inherited from class org.datanucleus.query.expression.Expression.Operator
toString
-
-
-
-
Constructor Detail
-
DyadicOperator
public DyadicOperator(String symbol, int precedence, boolean isAssociative)
Dyadic operator- Parameters:
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 expression
-
-
Method Detail
-
isHigherThanLeftSide
public boolean isHigherThanLeftSide(Expression.Operator op)
Checks if this operation is higher than operatoropin left side of the expression- Parameters:
op- the operator in the left side of the expression- Returns:
- true if this operation is higher than operator
opin left side of the expression
-
isHigherThanRightSide
public boolean isHigherThanRightSide(Expression.Operator op)
Checks if this operation is higher than operatoropin right side of the expression- Parameters:
op- the operator in the right side of the expression- Returns:
- true if this operation is higher than operator
opin right side of the expression
-
-