Java Utililty Methods Collection Empty

List of utility methods to do Collection Empty

Description

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

Method

booleanisEmpty(Collection col)
is Empty
return col == null || col.isEmpty();
booleanisEmpty(Collection col)
Returns true if a collection is null or empty
if (col == null)
    return true;
return col.isEmpty();
booleanisEmpty(Collection collection)
Helper to check if the collection is null or empty.
Collection#isEmpty() is not static and therefore require additional check for null .
return collection == null || collection.isEmpty();
booleanisEmpty(Collection collection)
is Empty
return collection == null || collection.isEmpty();
booleanisEmpty(Collection collection)
is Empty
return collection == null || collection.isEmpty();
booleanisEmpty(Collection collection)
is Empty
if (null == collection || collection.isEmpty() || collection.size() <= 0)
    return true;
return false;
booleanisEmpty(Collection collection)
is Empty
if (null == collection || collection.isEmpty()) {
    return true;
return false;
booleanisEmpty(Collection collection)
is Empty
return ((null == collection) || (0 == collection.size()));
booleanisEmpty(Collection collection)
is Empty
return !isNotEmpty(collection);
booleanisEmpty(Collection collection)
Returns true if the the size of the collection is 0 or if the collection is null.
return getSize(collection) == 0;