implemented isNotXxx methods as !isXxx calls to simplify and ensure symmetry

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@345907 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2005-11-21 14:10:08 +00:00
parent 47cb8ddccd
commit 03174f6358
1 changed files with 2 additions and 11 deletions

View File

@ -212,7 +212,7 @@ public class StringUtils {
* @return <code>true</code> if the String is not empty and not null
*/
public static boolean isNotEmpty(String str) {
return str != null && str.length() > 0;
return !StringUtils.isEmpty(str);
}
/**
@ -260,16 +260,7 @@ public class StringUtils {
* @since 2.0
*/
public static boolean isNotBlank(String str) {
int strLen;
if (str == null || (strLen = str.length()) == 0) {
return false;
}
for (int i = 0; i < strLen; i++) {
if ((Character.isWhitespace(str.charAt(i)) == false)) {
return true;
}
}
return false;
return !StringUtils.isBlank(str);
}
// Trim