mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
添加bigdecimal方法
This commit is contained in:
parent
3ebd7d9ce0
commit
ca6514e0a3
@ -2766,4 +2766,15 @@ public class NumberUtil {
|
||||
}
|
||||
}
|
||||
// ------------------------------------------------------------------------------------------- Private method end
|
||||
|
||||
/**
|
||||
* null转换为BigDecimal<br>
|
||||
*
|
||||
* @param bigDecimal 被转换的值
|
||||
* @return BigDecimal
|
||||
* @since 5.8.1
|
||||
*/
|
||||
public static BigDecimal nullToZero(BigDecimal bigDecimal) {
|
||||
return bigDecimal == null ? BigDecimal.ZERO : bigDecimal;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user