Class MathProcessor


  • public class MathProcessor
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.math.MathContext MATH_CONTEXT  
    • Constructor Summary

      Constructors 
      Constructor Description
      MathProcessor()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.Object _doOperations​(int type1, java.lang.Object val1, int operation, int type2, java.lang.Object val2)  
      private static int box​(int type)  
      private static java.lang.Object doBigDecimalArithmetic​(java.math.BigDecimal val1, int operation, java.math.BigDecimal val2, boolean iNumber, int returnTarget)  
      private static java.lang.Object doOperationNonNumeric​(int type1, java.lang.Object val1, int operation, java.lang.Object val2)  
      static java.lang.Object doOperations​(int type1, java.lang.Object val1, int operation, int type2, java.lang.Object val2)  
      static java.lang.Object doOperations​(java.lang.Object val1, int operation, int type2, java.lang.Object val2)  
      static java.lang.Object doOperations​(java.lang.Object val1, int operation, java.lang.Object val2)  
      private static java.lang.Object doOperationsSameType​(int type1, java.lang.Object val1, int operation, java.lang.Object val2)  
      private static java.lang.Object doPrimWrapperArithmetic​(java.lang.Number val1, int operation, java.lang.Number val2, boolean iNumber, int returnTarget)  
      private static InternalNumber getInternalNumberFromType​(java.lang.Object in, int type)  
      private static java.lang.Double getNumber​(java.lang.Object in, int type)  
      private static boolean isIntegerType​(int type)  
      private static boolean isNumericOperation​(int type1, java.lang.Object val1, int operation, int type2, java.lang.Object val2)  
      private static java.lang.Boolean safeEquals​(java.lang.Object val1, java.lang.Object val2)  
      private static java.lang.Boolean safeNotEquals​(java.lang.Object val1, java.lang.Object val2)  
      private static java.lang.Object toType​(java.lang.Number val, int returnType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MATH_CONTEXT

        private static final java.math.MathContext MATH_CONTEXT
    • Constructor Detail

      • MathProcessor

        public MathProcessor()
    • Method Detail

      • doOperations

        public static java.lang.Object doOperations​(java.lang.Object val1,
                                                    int operation,
                                                    java.lang.Object val2)
      • doOperations

        public static java.lang.Object doOperations​(java.lang.Object val1,
                                                    int operation,
                                                    int type2,
                                                    java.lang.Object val2)
      • doOperations

        public static java.lang.Object doOperations​(int type1,
                                                    java.lang.Object val1,
                                                    int operation,
                                                    int type2,
                                                    java.lang.Object val2)
      • doPrimWrapperArithmetic

        private static java.lang.Object doPrimWrapperArithmetic​(java.lang.Number val1,
                                                                int operation,
                                                                java.lang.Number val2,
                                                                boolean iNumber,
                                                                int returnTarget)
      • toType

        private static java.lang.Object toType​(java.lang.Number val,
                                               int returnType)
      • doBigDecimalArithmetic

        private static java.lang.Object doBigDecimalArithmetic​(java.math.BigDecimal val1,
                                                               int operation,
                                                               java.math.BigDecimal val2,
                                                               boolean iNumber,
                                                               int returnTarget)
      • _doOperations

        private static java.lang.Object _doOperations​(int type1,
                                                      java.lang.Object val1,
                                                      int operation,
                                                      int type2,
                                                      java.lang.Object val2)
      • isNumericOperation

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

        private static boolean isIntegerType​(int type)
      • doOperationNonNumeric

        private static java.lang.Object doOperationNonNumeric​(int type1,
                                                              java.lang.Object val1,
                                                              int operation,
                                                              java.lang.Object val2)
      • safeEquals

        private static java.lang.Boolean safeEquals​(java.lang.Object val1,
                                                    java.lang.Object val2)
      • safeNotEquals

        private static java.lang.Boolean safeNotEquals​(java.lang.Object val1,
                                                       java.lang.Object val2)
      • doOperationsSameType

        private static java.lang.Object doOperationsSameType​(int type1,
                                                             java.lang.Object val1,
                                                             int operation,
                                                             java.lang.Object val2)
      • box

        private static int box​(int type)
      • getNumber

        private static java.lang.Double getNumber​(java.lang.Object in,
                                                  int type)
      • getInternalNumberFromType

        private static InternalNumber getInternalNumberFromType​(java.lang.Object in,
                                                                int type)