Class Numbers


  • public class Numbers
    extends Object
    Utilities of arithmetic operations.
    Author:
    simonpai
    • Constructor Detail

      • Numbers

        public Numbers()
    • Method Detail

      • getTypeBound

        public static byte getTypeBound​(Number n)
        Return the minimal variable type required to hold the number.
        Returns:
        either NULL, INTEGER, LONG, or DOUBLE
      • divide

        public static Number divide​(Number n,
                                    int divisor)
        Divide a Number by an int with automatic casting.