Java Collection Empty isEmpty(final Collection collection)

Here you can find the source of isEmpty(final Collection collection)

Description

is Empty

License

Open Source License

Declaration

public static boolean isEmpty(final Collection<?> collection) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Collection;

public class Main {
    public static boolean isEmpty(final Collection<?> collection) {
        if (null == collection) {
            return true;
        } else {/*  w  w w.j a va  2  s .com*/
            return collection.isEmpty();
        }
    }

    public static boolean isEmpty(Object[] objects) {
        return (objects == null || objects.length == 0) ? true : false;
    }
}

Related

  1. isEmpty(Collection items)
  2. isEmpty(Collection c)
  3. isEmpty(final Collection values)
  4. isEmpty(final Collection coll)
  5. isEmpty(final Collection collection)
  6. isEmpty(final Collection collection)
  7. isEmpty(final Collection collection)
  8. isEmpty(final Collection value)
  9. isEmpty(final Collection c)