Class Expression.DyadicOperator
java.lang.Object
org.datanucleus.store.query.expression.Expression.Operator
org.datanucleus.store.query.expression.Expression.DyadicOperator
- All Implemented Interfaces:
Serializable
- Enclosing class:
Expression
"Dyadic" operator performs operation on one or two operands.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanAn associative operator is one for which parentheses can be inserted and removed without changing the meaning of the expressionprivate static final longFields inherited from class Expression.Operator
precedence, symbol -
Constructor Summary
ConstructorsConstructorDescriptionDyadicOperator(String symbol, int precedence, boolean isAssociative) Dyadic operator -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this operation is higher than operatoropin left side of the expressionbooleanChecks if this operation is higher than operatoropin right side of the expressionMethods inherited from class Expression.Operator
toString
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
isAssociative
private final boolean isAssociativeAn associative operator is one for which parentheses can be inserted and removed without changing the meaning of the expression
-
-
Constructor Details
-
DyadicOperator
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 Details
-
isHigherThanLeftSide
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
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
-