public class NumberUtil extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static org.slf4j.Logger |
_Logger
日志记录器
|
static double[] |
_nilDoubles
0项的double数组
|
static int[] |
_nilInts
0项的int数组
|
static long[] |
_nilLongs
0项的long数组
|
| 构造器和说明 |
|---|
NumberUtil() |
public static final org.slf4j.Logger _Logger
public static final int[] _nilInts
public static final long[] _nilLongs
public static final double[] _nilDoubles
public static final int toInt(String str) throws NumberFormatException
str - 字串NumberFormatException - 格式无效则异常public static int toInt(String str, int defaultValue)
str - 字串defaultValue - 格式无效则使用此值public static double toDouble(String str, double defaultValue)
str - (带小数)数值defaultValue - 格式无效则使用此值public static final boolean isNumber(char ch)
ch - 字符public static final boolean isNumber(String str)
str - 要检查的字串Copyright © 2021. All rights reserved.