类 NumberUtils


  • public class NumberUtils
    extends Object
    • 构造器详细资料

      • NumberUtils

        public NumberUtils()
    • 方法详细资料

      • isNumber

        public static boolean isNumber​(String text)
      • isScientificNumber

        public static boolean isScientificNumber​(String text)
      • formatToChinese

        public static <T extends NumberString formatToChinese​(T number)
      • formatNumber

        public static <T extends NumberString formatNumber​(T number,
                                                             int precision,
                                                             boolean significantDigit)
      • formatNumber

        public static <T extends NumberString formatNumber​(T number)
      • scientificNotationFormat

        public static <T extends NumberString scientificNotationFormat​(T number,
                                                                         int precision)
      • parseNumber

        public static <T extends Number> T parseNumber​(String text,
                                                       Class<T> targetClass)
      • max

        public static <T extends Number> T max​(T t1,
                                               T t2)
      • min

        public static <T extends Number> T min​(T t1,
                                               T t2)
      • parseLong

        public static <T> long parseLong​(T text)
      • parseLong

        public static <T> long parseLong​(T text,
                                         long defaultValue)
      • parseDouble

        public static <T> double parseDouble​(T text)
      • parseDouble

        public static <T> double parseDouble​(T text,
                                             double defaultValue)
      • parseFloat

        public static <T> float parseFloat​(T text)
      • parseFloat

        public static <T> float parseFloat​(T text,
                                           float defaultValue)
      • parseInt

        public static <T> int parseInt​(T text)
      • parseInt

        public static <T> int parseInt​(T text,
                                       int defaultValue)
      • parseShort

        public static <T> short parseShort​(T text)
      • parseShort

        public static <T> short parseShort​(T text,
                                           short defaultValue)
      • parseBigInteger

        public static <T> BigInteger parseBigInteger​(T text)
      • parseBigInteger

        public static <T> BigInteger parseBigInteger​(T text,
                                                     BigInteger defaultValue)
      • parseBigDecimal

        public static <T> BigDecimal parseBigDecimal​(T text)
      • parseBigDecimal

        public static <T> BigDecimal parseBigDecimal​(T text,
                                                     BigDecimal defaultValue)
      • toDouble

        public static <T> double toDouble​(T number)
      • toCurrencyDouble

        public static <T> double toCurrencyDouble​(T number)
      • toUnitPriceDouble

        public static <T> double toUnitPriceDouble​(T number)
      • toQuantityDouble

        public static <T> double toQuantityDouble​(T number)
      • toDouble

        public static <T> double toDouble​(T number,
                                          int precision)
      • toBinaryNumber

        public static int toBinaryNumber​(String number)
      • isGreater

        public static boolean isGreater​(Number n1,
                                        Number n2)
      • isLess

        public static boolean isLess​(Number n1,
                                     Number n2)
      • add

        @Deprecated
        public static double add​(double v1,
                                 double v2)
        已过时。
      • sub

        @Deprecated
        public static double sub​(double v1,
                                 double v2)
        已过时。
      • mul

        @Deprecated
        public static double mul​(double v1,
                                 double v2)
        已过时。
      • div

        @Deprecated
        public static double div​(double v1,
                                 double v2)
        已过时。
      • round

        @Deprecated
        public static double round​(double v1,
                                   int scale)
        已过时。