You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-wms-java/src/main/java/com/glxp/api/util/IntUtil.java

36 lines
663 B
Java

2 years ago
package com.glxp.api.util;
import cn.hutool.core.util.StrUtil;
2 years ago
public class IntUtil {
public static int value(Integer value) {
if (value == null)
return 0;
else return value.intValue();
}
public static long value(Long value) {
if (value == null)
return 0l;
else return value.longValue();
}
2 years ago
public static boolean value(Boolean value) {
if (value == null)
return false;
else return value;
}
public static int value(String value) {
if (StrUtil.isEmpty(value))
return 0;
else return Integer.parseInt(value);
}
2 years ago
}