重载新增 Numbers#nullToZero(Byte)

pull/1/head
ZhouXY108 2024-11-27 22:30:51 +08:00
parent cee89835e5
commit 6bbf55160b
1 changed files with 4 additions and 0 deletions

View File

@ -93,6 +93,10 @@ public class Numbers {
// #region - nullToZero
public static byte nullToZero(@Nullable final Byte val) {
return val != null ? val : 0;
}
public static short nullToZero(@Nullable final Short val) {
return val != null ? val : 0;
}