cn.yangjunda.hibernate_pagehelper.StringUtil Maven / Gradle / Ivy
package cn.yangjunda.hibernate_pagehelper;
/**
* Created by juanda on 12/6/17.
*/
public class StringUtil {
public StringUtil() {
}
public static boolean isEmpty(String str) {
return str == null || str.length() == 0;
}
public static boolean isNotEmpty(String str) {
return !isEmpty(str);
}
public static boolean isBlank(String str) {
int strLen;
if(str != null && (strLen = str.length()) != 0) {
for(int i = 0; i < strLen; ++i) {
if(!Character.isWhitespace(str.charAt(i))) {
return false;
}
}
return true;
} else {
return true;
}
}
public static boolean isNotBlank(String str) {
return !isBlank(str);
}
}