public interface EvaluateMathDef
Modifier and Type | Method and Description |
---|---|
<T> T |
add(java.lang.String valueType,
T value1,
T value2)
Add the two objects together and return.
|
<T> T |
divide(java.lang.String valueType,
T value1,
T value2)
Divide the first value by the second and return the result.
|
<T> boolean |
mathCompare(java.lang.String valueType,
T value1,
T value2,
java.lang.String operator)
Evaluate the comparison expression.
|
<T> java.lang.Object |
mathOperation(java.lang.String valueType,
T value1,
T value2,
java.lang.String operator)
Evaluate the mathematical expression.
|
<T> T |
multiply(java.lang.String valueType,
T value1,
T value2)
Multiply the first value by the second and return the result.
|
<T> T |
subtract(java.lang.String valueType,
T value1,
T value2)
Subtract the second value from the first and return the result.
|
<T> java.lang.Object mathOperation(java.lang.String valueType, T value1, T value2, java.lang.String operator) throws java.lang.Exception
valueType
- the type of the value. This is the object type classname.value1
- first value.value2
- second value.operator
- mathematical operator - can be add, subtract, multiply, divide.
These are all defined in the AiHeuristicConst
class.java.lang.Exception
- any error.<T> boolean mathCompare(java.lang.String valueType, T value1, T value2, java.lang.String operator) throws java.lang.Exception
valueType
- the type of the value. This is the object type classname.value1
- first value.value2
- second value.operator
- comparison operator, which evaluates 'value1 operator value2'.
Operator can be greater than (GT), less than (LT), etc. These are all defined in
the AiHeuristicConst
class.java.lang.Exception
- any error.<T> T add(java.lang.String valueType, T value1, T value2) throws java.lang.Exception
valueType
- the type of the value.value1
- first value.value2
- second value.java.lang.Exception
- any error.<T> T subtract(java.lang.String valueType, T value1, T value2) throws java.lang.Exception
valueType
- the type of the value.value1
- first value.value2
- second value.java.lang.Exception
- any error.<T> T multiply(java.lang.String valueType, T value1, T value2) throws java.lang.Exception
valueType
- the type of the value.value1
- first value.value2
- second value.java.lang.Exception
- any error.<T> T divide(java.lang.String valueType, T value1, T value2) throws java.lang.Exception
valueType
- the type of the value.value1
- first value.value2
- second value.java.lang.Exception
- any error.