protected static class CalculatorExpr.Operators
extends java.lang.Object
CalculatorExpr.setExpr(String)
converts a string given expression in the internal form
which uses this operations, respectively the SetExpr converts an expression from ZBNF
TODO Idea-typedOperator: this class may be an interface instead, which is implemented for the known
CalculatorExpr.ExpressionType
. Then the switch-case can be saved in calculation time.Modifier and Type | Field and Description |
---|---|
protected static CalculatorExpr.Operator |
addOperation
Adds the arg to the accu.
|
protected static CalculatorExpr.Operator |
assignOperation
Assign the current value to the left variable.
|
protected static CalculatorExpr.Operator |
bitNotOperation
Negates all bits from a given integer type value or negates a boolean in the accu.
|
protected static CalculatorExpr.Operator |
boolAndOperation
Ands the arg with the accu.
|
protected static CalculatorExpr.Operator |
boolCheckAndOperation
Ands the arg with the accu.
|
protected static CalculatorExpr.Operator |
boolCheckOrOperation
Ors the arg with the accu.
|
protected static CalculatorExpr.Operator |
boolNotOperation
Converts the accu (val) to a boolean and negates it.
|
protected static CalculatorExpr.Operator |
boolOperation
Converts the accu (val) to a boolean.
|
protected static CalculatorExpr.Operator |
boolOrOperation
Ors the arg with the accu.
|
protected static CalculatorExpr.Operator |
cmpContainsOperation
Check whether the String in accu contains the String in arg.
|
protected static CalculatorExpr.Operator |
cmpEndsOperation
Check whether the String in accu ends with the String in arg.
|
protected static CalculatorExpr.Operator |
cmpEqOperation
Compares the arg with the accu.
|
protected static CalculatorExpr.Operator |
cmpGreaterEqualOperation
Compares the arg with the accu.
|
protected static CalculatorExpr.Operator |
cmpGreaterThanOperation
Compares the arg with the accu.
|
protected static CalculatorExpr.Operator |
cmpInstanceofOperation
Checks whether the accu is a instance of the given class.
|
protected static CalculatorExpr.Operator |
cmpLessEqualOperation
Compares the arg with the accu.
|
protected static CalculatorExpr.Operator |
cmpLessThanOperation
Compares the arg with the accu.
|
protected static CalculatorExpr.Operator |
cmpNeOperation
Compares the arg with the accu.
|
protected static CalculatorExpr.Operator |
cmpStartsOperation
Check whether the String in accu starts with the String in arg.
|
protected static CalculatorExpr.Operator |
divOperation
Divides the accu with the arg .
|
protected static CalculatorExpr.Operator |
mulOperation
Multiplies the arg with the accu, Ands a Boolean.
|
protected static CalculatorExpr.Operator |
negOperation
Negates the accu, unary operation.
|
protected static CalculatorExpr.Operator |
setOperation
Sets the given value to the accu.
|
protected static CalculatorExpr.Operator |
subOperation
Subtracts the arg from the accu.
|
Modifier | Constructor and Description |
---|---|
protected |
Operators() |
protected static final CalculatorExpr.Operator boolOperation
protected static final CalculatorExpr.Operator boolNotOperation
protected static final CalculatorExpr.Operator bitNotOperation
IllegalArgumentException
"unknown type" if it is a float type vale, String or Object value.
Unary operation, does not use value2.protected static final CalculatorExpr.Operator negOperation
IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator addOperation
IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator subOperation
IllegalArgumentException
"unknown Type" on Boolean, String or Object types.protected static final CalculatorExpr.Operator mulOperation
IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator divOperation
IllegalArgumentException
"unknown Type" on Boolean, String or Object types.protected static final CalculatorExpr.Operator cmpEqOperation
CalculatorExpr#booleanExpr
.
throws an IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator cmpNeOperation
CalculatorExpr#booleanExpr
.
throws an IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator cmpLessThanOperation
CalculatorExpr#booleanExpr
.
throws an IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator cmpGreaterEqualOperation
CalculatorExpr#booleanExpr
.
throws an IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator cmpGreaterThanOperation
CalculatorExpr#booleanExpr
.
throws an IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator cmpLessEqualOperation
CalculatorExpr#booleanExpr
.
throws an IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator cmpContainsOperation
CalculatorExpr#booleanExpr
.
throws an IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator cmpStartsOperation
CalculatorExpr#booleanExpr
.
throws an IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator cmpEndsOperation
CalculatorExpr#booleanExpr
.
throws an IllegalArgumentException
"unknown Type" on String or Object types.protected static final CalculatorExpr.Operator boolAndOperation
CalculatorExpr.Value.booleanValue()
.
Returns a CalculatorExpr#booleanExpr
.protected static final CalculatorExpr.Operator boolOrOperation
CalculatorExpr.Value.booleanValue()
.
Returns a CalculatorExpr#booleanExpr
.protected static final CalculatorExpr.Operator boolCheckAndOperation
CalculatorExpr.Value.booleanValue()
.
Returns a CalculatorExpr#booleanExpr
if the accu is true
respectively a CalculatorExpr#finishBooleanExpr
if the accu is false. In the last case all other And operations
cannot change the result, therefore they are not executed.protected static final CalculatorExpr.Operator boolCheckOrOperation
CalculatorExpr.Value.booleanValue()
.
Returns a CalculatorExpr#booleanExpr
if the accu is false
respectively a CalculatorExpr#finishBooleanExpr
if the accu is true. In the last case all other Or operations
cannot change the result, therefore they are not executed.protected static final CalculatorExpr.Operator cmpInstanceofOperation
protected static final CalculatorExpr.Operator setOperation
protected static final CalculatorExpr.Operator assignOperation