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 collection)
Check if the collection is empty.
return collection == null || collection.size() == 0;
booleanisEmpty(Collection o)
is Empty
return (o == null || o.isEmpty());
booleanisEmpty(Collection objs)
is Empty
if ((objs == null) || (objs.size() <= 0)) {
    return true;
return false;
booleanisEmpty(Collection value)
Checks if is empty.
if (value == null)
    return true;
return value.isEmpty();
booleanisEmpty(Collection values)
is Empty
return values == null || values.size() == 0;
booleanisEmpty(Collection c)
Checks if the given Collection is null or empty.
return c == null || c.isEmpty();
booleanisEmpty(Collection data)
is Empty
return (null == data || 0 == data.size());
booleanisEmpty(Collection objectCollection)
isEmpty (Collection): checks whether the collection is empty (either null or size 0)
if ((objectCollection == null) || (objectCollection.size() == 0))
    return true;
return false;
booleanisEmpty(Collection c)
is Empty
for (T t : c) {
    if (t != null) {
        return false;
return true;
booleanisEmpty(Collection c)
is Empty
if (c == null || c.size() == 0) {
    return true;
for (Iterator<T> iter = c.iterator(); iter.hasNext();) {
    if (iter.next() != null) {
        return false;
return true;