Simplify isNotEmpty by reusing isEmpty

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1671624 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benedikt Ritter 2015-04-06 18:06:41 +00:00
parent ef51b068ae
commit 173c162a45
1 changed files with 9 additions and 9 deletions

View File

@ -3554,7 +3554,7 @@ public static boolean isEmpty(final boolean[] array) {
* @since 2.5
*/
public static <T> boolean isNotEmpty(final T[] array) {
return (array != null && array.length != 0);
return !isEmpty(array);
}
/**
@ -3565,7 +3565,7 @@ public static <T> boolean isNotEmpty(final T[] array) {
* @since 2.5
*/
public static boolean isNotEmpty(final long[] array) {
return (array != null && array.length != 0);
return !isEmpty(array);
}
/**
@ -3576,7 +3576,7 @@ public static boolean isNotEmpty(final long[] array) {
* @since 2.5
*/
public static boolean isNotEmpty(final int[] array) {
return (array != null && array.length != 0);
return !isEmpty(array);
}
/**
@ -3587,7 +3587,7 @@ public static boolean isNotEmpty(final int[] array) {
* @since 2.5
*/
public static boolean isNotEmpty(final short[] array) {
return (array != null && array.length != 0);
return !isEmpty(array);
}
/**
@ -3598,7 +3598,7 @@ public static boolean isNotEmpty(final short[] array) {
* @since 2.5
*/
public static boolean isNotEmpty(final char[] array) {
return (array != null && array.length != 0);
return !isEmpty(array);
}
/**
@ -3609,7 +3609,7 @@ public static boolean isNotEmpty(final char[] array) {
* @since 2.5
*/
public static boolean isNotEmpty(final byte[] array) {
return (array != null && array.length != 0);
return !isEmpty(array);
}
/**
@ -3620,7 +3620,7 @@ public static boolean isNotEmpty(final byte[] array) {
* @since 2.5
*/
public static boolean isNotEmpty(final double[] array) {
return (array != null && array.length != 0);
return !isEmpty(array);
}
/**
@ -3631,7 +3631,7 @@ public static boolean isNotEmpty(final double[] array) {
* @since 2.5
*/
public static boolean isNotEmpty(final float[] array) {
return (array != null && array.length != 0);
return !isEmpty(array);
}
/**
@ -3642,7 +3642,7 @@ public static boolean isNotEmpty(final float[] array) {
* @since 2.5
*/
public static boolean isNotEmpty(final boolean[] array) {
return (array != null && array.length != 0);
return !isEmpty(array);
}
/**