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(final Collection collection)
Returns true if the collection is null or empty; false otherwise.
return collection == null || collection.isEmpty();
booleanisEmpty(final Collection collection)
is Empty
return ((collection == null) || collection.isEmpty());
booleanisEmpty(final Collection value)
Tests given value to see if it is empty.
return 0 == value.size();
booleanisEmpty(final Collection c)
Check if a collection of a string is empty.
if (c == null || c.isEmpty()) {
    return false;
for (final String text : c) {
    if (isNotEmpty(text)) {
        return false;
return true;
booleanisEmpty(final Collection c)
Checks whether the collection is empty, that means NULL or empty as in "no elements within".
return c == null || c.isEmpty();
booleanisEmpty(final Collection collection)
Checks if the given collection is not instancied or empty
return !isNotEmpty(collection);
booleanisEmpty(final Collection source)
Checks whether the passed collection is NULL or is empty.
boolean isEmpty = false;
isEmpty = (null == source || source.isEmpty());
return isEmpty;
booleanisEmpty(final Collection v)
 isEmpty(null)      = true isEmpty([])        = true isEmpty([1, 2, 3]) = false 
return (v == null) || v.isEmpty();
booleanisEmptyCollection(Collection collection)
is Empty Collection
return (collection == null) || collection.isEmpty();
booleanisEmptyCollection(Collection list)
is Empty Collection
boolean empty = false;
if (list != null && list.size() > 0) {
    empty = false;
} else {
    empty = true;
return empty;