Java Utililty Methods Array Null Element

List of utility methods to do Array Null Element

Description

The list of methods to do Array Null Element are organized into topic(s).

Method

booleanisNull(final Object[] array)
Checks if an array is null or empty or all its elements are null.
if (array == null || array.length == 0) {
    return true;
for (int i = 0; i < array.length; i++) {
    if (array[i] != null) {
        return false;
return true;
booleanisNull(Object[] objects)
is Null
if (objects != null && objects.length > 0) {
    for (Object object : objects) {
        if (object instanceof String) {
            if ((String) object == null || "".equals((String) object)
                    || "NULL".equals(((String) object).toUpperCase())) {
                return true;
        } else if (object instanceof Integer) {
...
booleanisNull(T array[])
Array is empty
return array == null || array.length == 0;
booleanisNullArray(String[] array)
is Null Array
return (array == null || array.length == 0 || (array.length == 1 && "".equals(array[0])));