Package net.sourceforge.plantuml.evalex
Class AbstractLazyOperator
- java.lang.Object
-
- net.sourceforge.plantuml.evalex.AbstractLazyOperator
-
- All Implemented Interfaces:
LazyOperator
- Direct Known Subclasses:
AbstractOperator
public abstract class AbstractLazyOperator extends java.lang.Object implements LazyOperator
Abstract implementation of an operator.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanbooleanOperatorWhether this operator is boolean or not.protected booleanleftAssocOperator is left associative.protected java.lang.StringoperThis operators name (pattern).protected intprecedenceOperators precedence.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractLazyOperator(java.lang.String oper, int precedence, boolean leftAssoc)Creates a new operator.protectedAbstractLazyOperator(java.lang.String oper, int precedence, boolean leftAssoc, boolean booleanOperator)Creates a new operator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetOper()Gets the String that is used to denote the operator in the expression.intgetPrecedence()Gets the precedence value of this operator.booleanisBooleanOperator()Gets whether this operator evaluates to a boolean expression.booleanisLeftAssoc()Gets whether this operator is left associative (true) or if this operator is right associative (false).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.plantuml.evalex.LazyOperator
eval
-
-
-
-
Constructor Detail
-
AbstractLazyOperator
protected AbstractLazyOperator(java.lang.String oper, int precedence, boolean leftAssoc, boolean booleanOperator)Creates a new operator.- Parameters:
oper- The operator name (pattern).precedence- The operators precedence.leftAssoc-trueif the operator is left associative, elsefalse.booleanOperator- Whether this operator is boolean.
-
AbstractLazyOperator
protected AbstractLazyOperator(java.lang.String oper, int precedence, boolean leftAssoc)Creates a new operator.- Parameters:
oper- The operator name (pattern).precedence- The operators precedence.leftAssoc-trueif the operator is left associative, elsefalse.
-
-
Method Detail
-
getOper
public java.lang.String getOper()
Description copied from interface:LazyOperatorGets the String that is used to denote the operator in the expression.- Specified by:
getOperin interfaceLazyOperator- Returns:
- The String that is used to denote the operator in the expression.
-
getPrecedence
public int getPrecedence()
Description copied from interface:LazyOperatorGets the precedence value of this operator.- Specified by:
getPrecedencein interfaceLazyOperator- Returns:
- the precedence value of this operator.
-
isLeftAssoc
public boolean isLeftAssoc()
Description copied from interface:LazyOperatorGets whether this operator is left associative (true) or if this operator is right associative (false).- Specified by:
isLeftAssocin interfaceLazyOperator- Returns:
trueif this operator is left associative.
-
isBooleanOperator
public boolean isBooleanOperator()
Description copied from interface:LazyOperatorGets whether this operator evaluates to a boolean expression.- Specified by:
isBooleanOperatorin interfaceLazyOperator- Returns:
trueif this operator evaluates to a boolean expression.
-
-