mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
添加bigdecimal方法
This commit is contained in:
parent
3ebd7d9ce0
commit
ca6514e0a3
@ -2766,4 +2766,15 @@ public class NumberUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ------------------------------------------------------------------------------------------- Private method end
|
// ------------------------------------------------------------------------------------------- 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…
x
Reference in New Issue
Block a user