Java Utililty Methods List Null Empty

List of utility methods to do List Null Empty

Description

The list of methods to do List Null Empty are organized into topic(s).

Method

booleanisNotEmpty(List list)
Check if any list is not null and not empty
return list != null && !list.isEmpty();
booleanisNotEmpty(List list)
checks whether a list contains at least one entry
return list != null && !list.isEmpty();
booleanisNotEmpty(List objList)
This function checks if the list of the objects is empty or not
return (isNotNull(objList) && (objList.size() > 0));
booleanisNotNullAndEmpty(List list)
is Not Null And Empty
return list != null && list.size() > 0;
booleanisNotNullAndNotEmpty(List list)
is Not Null And Not Empty
if (list == null) {
    return false;
return !list.isEmpty();
booleanisNull(List list)
is Null
return null == list;
booleanisNullish(java.util.List value)
is Nullish
boolean result = false;
if ((value == null) || (value.size() == 0)) {
    result = true;
return result;
booleanisNullList(List l)
Is Null or empty list
if (l == null) {
    return true;
} else if (l.size() == 0) {
    return true;
return false;
booleanisNullOrEmpty(List list)
is Null Or Empty
if (list == null || list.size() == 0) {
    return true;
return false;
booleanisNullOrEmpty(List list)
is Null Or Empty
return list == null || list.isEmpty();