public class NumberUtil
extends org.apache.commons.lang3.math.NumberUtils
| 构造器和说明 |
|---|
NumberUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static <T extends Number> |
isNumbers(Class<T> type,
String... str)
判断字符串是否是数字(指定类型)
|
static boolean |
isNumbers(String... str)
判断字符串是否是数字(无法具体判断是整型还是浮点型)
|
static BigDecimal |
keepLenthDecimals(int length,
BigDecimal old)
保留指定小数长度的数据
|
compare, compare, compare, compare, createBigDecimal, createBigInteger, createDouble, createFloat, createInteger, createLong, createNumber, isCreatable, isDigits, isNumber, isParsable, max, max, max, max, max, max, max, max, max, max, max, max, min, min, min, min, min, min, min, min, min, min, min, min, toByte, toByte, toDouble, toDouble, toFloat, toFloat, toInt, toInt, toLong, toLong, toShort, toShortpublic static boolean isNumbers(String... str)
str - public static <T extends Number> boolean isNumbers(Class<T> type, String... str)
str - public static BigDecimal keepLenthDecimals(int length, BigDecimal old)
length - old - Copyright © 2019. All rights reserved.