类 NumberUtil


  • public class NumberUtil
    extends Object
    数据工具类
    作者:
    youta
    • 字段详细资料

      • hanArr

        private static String[] hanArr
      • unitArr

        private static String[] unitArr
    • 构造器详细资料

      • NumberUtil

        public NumberUtil()
    • 方法详细资料

      • stoi

        public static int stoi​(String string)
        String转成int的值, 若无法转换,默认返回0
      • stoi

        public static int stoi​(String string,
                               int defaultValue)
      • stol

        public static long stol​(String string)
        String转成long的值, 若无法转换,默认返回0
      • stol

        public static long stol​(String string,
                                long defaultValue)
      • stod

        public static double stod​(String string)
        String转成double的值, 若无法转换,默认返回0.00
      • stod

        public static double stod​(String string,
                                  double defaultValue)
      • toChineseNum

        public static String toChineseNum​(int number)
        将整数转成中文表示
      • random

        public static int random​(int min,
                                 int max)
        获取一个属于[min, max)中的随机数