类 NumberUtil


  • public class NumberUtil
    extends java.lang.Object
    作者:
    BiJi'an
    Description:
    Date:
    2023-06-10 00:53
    • 构造器概要

      构造器 
      构造器 说明
      NumberUtil()  
    • 方法概要

      所有方法 静态方法 具体方法 
      修饰符和类型 方法 说明
      static double toDouble​(java.lang.String str)  
      static double toDouble​(java.lang.String str, double defaultValue)  
      static float toFloat​(java.lang.String str)  
      static float toFloat​(java.lang.String str, float defaultValue)  
      static int toInt​(java.lang.String str)  
      static int toInt​(java.lang.String str, int defaultValue)  
      static long toLong​(java.lang.String str)  
      static long toLong​(java.lang.String str, long defaultValue)  
      static short toShort​(java.lang.String str)  
      static short toShort​(java.lang.String str, short defaultValue)  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • NumberUtil

        public NumberUtil()
    • 方法详细资料

      • toShort

        public static short toShort​(java.lang.String str)
        参数:
        str - str
        返回:
        short
        Description:
        toShort
        Date:
        2023-06-10 00:57
        Title:
        toShort
      • toShort

        public static short toShort​(java.lang.String str,
                                    short defaultValue)
        参数:
        str - str
        defaultValue - defaultValue
        返回:
        short
        Description:
        toShort
        Date:
        2023-06-10 00:57
        Title:
        toShort
      • toFloat

        public static float toFloat​(java.lang.String str)
        参数:
        str - str
        返回:
        float
        Description:
        toFloat
        Date:
        2023-06-10 00:56
        Title:
        toFloat
      • toFloat

        public static float toFloat​(java.lang.String str,
                                    float defaultValue)
        参数:
        str - str
        defaultValue - defaultValue
        返回:
        float
        Description:
        toFloat
        Date:
        2023-06-10 00:56
        Title:
        toFloat
      • toDouble

        public static double toDouble​(java.lang.String str)
        参数:
        str - str
        返回:
        double
        Description:
        toDouble
        Date:
        2023-06-10 00:54
        Title:
        toDouble
      • toDouble

        public static double toDouble​(java.lang.String str,
                                      double defaultValue)
        参数:
        str - str
        defaultValue - defaultValue
        返回:
        double
        Description:
        toDouble
        Date:
        2023-06-10 00:54
        Title:
        toDouble
      • toInt

        public static int toInt​(java.lang.String str)
        参数:
        str - str
        返回:
        int
        Description:
        toInt
        Date:
        2023-06-10 00:54
        Title:
        toInt
      • toInt

        public static int toInt​(java.lang.String str,
                                int defaultValue)
        参数:
        str - str
        defaultValue - defaultValue
        返回:
        int
        Description:
        toInt
        Date:
        2023-06-10 00:54
        Title:
        toInt
      • toLong

        public static long toLong​(java.lang.String str)
        参数:
        str - str
        返回:
        long
        Description:
        toLong
        Date:
        2023-06-10 00:54
        Title:
        toLong
      • toLong

        public static long toLong​(java.lang.String str,
                                  long defaultValue)
        参数:
        str - str
        defaultValue - defaultValue
        返回:
        long
        Description:
        toLong
        Date:
        2023-06-10 00:55
        Title:
        toLong