public abstract class AbstractLazyOperator extends java.lang.Object implements LazyOperator
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
booleanOperator
Whether this operator is boolean or not.
|
protected boolean |
leftAssoc
Operator is left associative.
|
protected java.lang.String |
oper
This operators name (pattern).
|
protected int |
precedence
Operators precedence.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractLazyOperator(java.lang.String oper,
int precedence,
boolean leftAssoc)
Creates a new operator.
|
protected |
AbstractLazyOperator(java.lang.String oper,
int precedence,
boolean leftAssoc,
boolean booleanOperator)
Creates a new operator.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getOper()
Gets the String that is used to denote the operator in the expression.
|
int |
getPrecedence()
Gets the precedence value of this operator.
|
boolean |
isBooleanOperator()
Gets whether this operator evaluates to a boolean expression.
|
boolean |
isLeftAssoc()
Gets whether this operator is left associative (
true) or if
this operator is right associative (false). |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitevalprotected java.lang.String oper
protected int precedence
protected boolean leftAssoc
protected boolean booleanOperator
protected AbstractLazyOperator(java.lang.String oper,
int precedence,
boolean leftAssoc,
boolean booleanOperator)
oper - The operator name (pattern).precedence - The operators precedence.leftAssoc - true if the operator is left associative,
else false.booleanOperator - Whether this operator is boolean.protected AbstractLazyOperator(java.lang.String oper,
int precedence,
boolean leftAssoc)
oper - The operator name (pattern).precedence - The operators precedence.leftAssoc - true if the operator is left associative,
else false.public java.lang.String getOper()
LazyOperatorgetOper in interface LazyOperatorpublic int getPrecedence()
LazyOperatorgetPrecedence in interface LazyOperatorpublic boolean isLeftAssoc()
LazyOperatortrue) or if
this operator is right associative (false).isLeftAssoc in interface LazyOperatortrue if this operator is left associative.public boolean isBooleanOperator()
LazyOperatorisBooleanOperator in interface LazyOperatortrue if this operator evaluates to a boolean
expression.