Class MathProcessor

java.lang.Object
org.mvel2.math.MathProcessor

public class MathProcessor extends Object
  • Field Details

    • MATH_CONTEXT

      private static final MathContext MATH_CONTEXT
  • Constructor Details

    • MathProcessor

      public MathProcessor()
  • Method Details

    • doOperations

      public static Object doOperations(Object val1, int operation, Object val2)
    • doOperations

      public static Object doOperations(Object val1, int operation, int type2, Object val2)
    • doOperations

      public static Object doOperations(int type1, Object val1, int operation, int type2, Object val2)
    • doPrimWrapperArithmetic

      private static Object doPrimWrapperArithmetic(Number val1, int operation, Number val2, int returnTarget)
    • toType

      private static Object toType(Number val, int returnType)
    • doBigDecimalArithmetic

      private static Object doBigDecimalArithmetic(BigDecimal val1, int operation, BigDecimal val2, boolean iNumber, int returnTarget)
    • _doOperations

      private static Object _doOperations(int type1, Object val1, int operation, int type2, Object val2)
    • isNumericOperation

      private static boolean isNumericOperation(int type1, Object val1, int operation, int type2, Object val2)
    • isIntegerType

      private static boolean isIntegerType(int type)
    • doOperationNonNumeric

      private static Object doOperationNonNumeric(int type1, Object val1, int operation, Object val2)
    • safeEquals

      private static Boolean safeEquals(Object val1, Object val2)
    • safeNotEquals

      private static Boolean safeNotEquals(Object val1, Object val2)
    • doOperationsSameType

      private static Object doOperationsSameType(int type1, Object val1, int operation, Object val2)
    • toShort

      private static short toShort(Object val)
    • toInteger

      private static int toInteger(Object val)
    • toLong

      private static long toLong(Object val)
    • toDouble

      private static double toDouble(Object val)
    • toFloat

      private static float toFloat(Object val)
    • box

      private static int box(int type)
    • getNumber

      private static Double getNumber(Object in, int type)
    • asBigDecimal

      private static BigDecimal asBigDecimal(Object in)