Java Utililty Methods Array Empty Check

List of utility methods to do Array Empty Check

Description

The list of methods to do Array Empty Check are organized into topic(s).

Method

booleanisNotEmpty(T[] array)

Checks if an array of Objects is not empty or not null .

return (array != null && array.length != 0);
booleanisNotEmpty(T[] array)
is Not Empty
return false == isEmpty(array);
booleanisNotEmpty(T[] array)
Returns if the given array is null or empty.
return !isEmpty(array);
booleanisNotEmpty(T[] array)
Returns if the given array is null or empty.
return !isEmpty(array);
booleanisNotEmpty(T[] array)
is Not Empty
return false == isEmpty(array);
booleanisNotNullAndNotEmpty(final Object[] array)
is Not Null And Not Empty
return !(array == null || array.length == 0);
booleanisNotNullOrEmpty(T[] array)
is Not Null Or Empty
return !isNullOrEmpty(array);
booleanisNullOrEmpty(Object[] array)
is Null Or Empty
return array == null || array.length == 0;
booleanisNullOrEmpty(String[] s)
is Null Or Empty
if ((s == null) || (s.length == 0))
    return true;
for (int i = 0; i < s.length; i++) {
    if (!isNullOrEmpty(s[i])) {
        return false;
return true;
...
booleanisNullOrEmpty(T[] array)
is Null Or Empty
return array == null || array.length == 0;