Package net.sourceforge.plantuml.evalex
Interface LazyOperator
-
- All Known Subinterfaces:
Operator
- All Known Implementing Classes:
AbstractLazyOperator
,AbstractOperator
,AbstractUnaryOperator
,Expression.Operator
,Expression.UnaryOperator
public interface LazyOperator
Base interface which is required for all operators.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Expression.LazyNumber
eval(Expression.LazyNumber v1, Expression.LazyNumber v2)
Implementation for this operator.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
).
-
-
-
Method Detail
-
getOper
java.lang.String getOper()
Gets the String that is used to denote the operator in the expression.- Returns:
- The String that is used to denote the operator in the expression.
-
getPrecedence
int getPrecedence()
Gets the precedence value of this operator.- Returns:
- the precedence value of this operator.
-
isLeftAssoc
boolean isLeftAssoc()
Gets whether this operator is left associative (true
) or if this operator is right associative (false
).- Returns:
true
if this operator is left associative.
-
isBooleanOperator
boolean isBooleanOperator()
Gets whether this operator evaluates to a boolean expression.- Returns:
true
if this operator evaluates to a boolean expression.
-
eval
Expression.LazyNumber eval(Expression.LazyNumber v1, Expression.LazyNumber v2)
Implementation for this operator.- Parameters:
v1
- Operand 1.v2
- Operand 2.- Returns:
- The result of the operation.
-
-