public class NumberUtils extends Object
| 构造器和说明 |
|---|
NumberUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Integer |
getGtValue(Integer value,
Integer compareValue,
Integer defaultValue)
比对后取值
|
static Integer |
getInt(Integer value,
Integer defaults)
获取Int值,null返回默认值
|
static Long |
getLong(Long value,
Long defaults)
获取Long值,null返回默认值
|
static boolean |
isBlankZero(Integer value)
Is Blank Or Zero
|
static boolean |
isBlankZero(Long value) |
static boolean |
isSame(Integer numOne,
Integer numTwo)
比较两个值是否相同
|
static boolean |
isSame(Long numOne,
Long numTwo)
比较两个值是否相同
|
static boolean |
let(Integer value,
Integer compareVal)
是否小于等于
|
static Integer |
longToInt(Long value)
Convert Long To Int
|
static BigInteger |
pow(Long num,
int e)
计算数字次方
|
static int |
toInt(String str,
int defaultValue)
String转int
|
public static int toInt(String str, int defaultValue)
str - 值defaultValue - 默认值public static Integer longToInt(Long value)
value - Longpublic static boolean let(Integer value, Integer compareVal)
value - 数compareVal - 比数public static boolean isBlankZero(Integer value)
value - 值public static boolean isBlankZero(Long value)
public static BigInteger pow(Long num, int e)
num - 数字e - 次方值public static boolean isSame(Long numOne, Long numTwo)
numOne - 数1numTwo - 数2public static boolean isSame(Integer numOne, Integer numTwo)
numOne - 数1numTwo - 数2public static Integer getGtValue(Integer value, Integer compareValue, Integer defaultValue)
value - 值compareValue - 比对值defaultValue - 默认值public static Integer getInt(Integer value, Integer defaults)
value - 值defaults - 默认值Copyright © 2024. All rights reserved.