Package org.mvel2.math
Class MathProcessor
java.lang.Object
org.mvel2.math.MathProcessor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Object
_doOperations
(int type1, Object val1, int operation, int type2, Object val2) private static BigDecimal
asBigDecimal
(Object in) private static int
box
(int type) private static Object
doBigDecimalArithmetic
(BigDecimal val1, int operation, BigDecimal val2, boolean iNumber, int returnTarget) private static Object
doOperationNonNumeric
(int type1, Object val1, int operation, Object val2) static Object
doOperations
(int type1, Object val1, int operation, int type2, Object val2) static Object
doOperations
(Object val1, int operation, int type2, Object val2) static Object
doOperations
(Object val1, int operation, Object val2) private static Object
doOperationsSameType
(int type1, Object val1, int operation, Object val2) private static Object
doPrimWrapperArithmetic
(Number val1, int operation, Number val2, int returnTarget) private static Double
private static boolean
isIntegerType
(int type) private static boolean
isNumericOperation
(int type1, Object val1, int operation, int type2, Object val2) private static Boolean
safeEquals
(Object val1, Object val2) private static Boolean
safeNotEquals
(Object val1, Object val2) private static double
private static float
private static int
private static long
private static short
private static Object
-
Field Details
-
MATH_CONTEXT
-
-
Constructor Details
-
MathProcessor
public MathProcessor()
-
-
Method Details
-
doOperations
-
doOperations
-
doOperations
-
doPrimWrapperArithmetic
-
toType
-
doBigDecimalArithmetic
private static Object doBigDecimalArithmetic(BigDecimal val1, int operation, BigDecimal val2, boolean iNumber, int returnTarget) -
_doOperations
-
isNumericOperation
-
isIntegerType
private static boolean isIntegerType(int type) -
doOperationNonNumeric
-
safeEquals
-
safeNotEquals
-
doOperationsSameType
-
toShort
-
toInteger
-
toLong
-
toDouble
-
toFloat
-
box
private static int box(int type) -
getNumber
-
asBigDecimal
-