package com.ruoyi.common.utils;
|
|
import com.sun.org.apache.xpath.internal.operations.Bool;
|
|
public class IntegerUtil {
|
public static Boolean isInteger(String str) {
|
try {
|
Integer.parseInt(str);
|
return true;
|
} catch (Exception e) {
|
return false;
|
}
|
}
|
|
/**
|
* 为空或小于0
|
* @param integer
|
* @return
|
*/
|
public static Boolean isEmpty(Integer integer){
|
return integer==null || integer<=0;
|
}
|
|
public static Boolean isNotEmpty(Integer integer){
|
return !isEmpty(integer);
|
}
|
}
|