Class Numbers

java.lang.Object
org.zkoss.pivot.impl.calc.Numbers

public class Numbers extends Object
Utilities of arithmetic operations.
Author:
simonpai
  • Field Details

  • Constructor Details

    • Numbers

      public Numbers()
  • Method Details

    • 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.