Java Collection Empty isEmpty(final Collection coll)

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

Description

Return if a collection is empty.

License

Apache License

Parameter

Parameter Description
coll a collection

Return

whether it is empty

Declaration

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

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Collection;

public class Main {
    /**/*from w  ww . ja va2s.  c  o m*/
     * Return if a collection is empty.
     *
     * @param coll a collection
     * @return whether it is empty
     */
    public static boolean isEmpty(final Collection<?> coll) {
        return coll == null || coll.isEmpty();
    }

    private static boolean isEmpty(final CharSequence cs) {
        return cs == null || cs.length() == 0;
    }
}

Related

  1. isEmpty(Collection collection)
  2. isEmpty(Collection collection, String messgae)
  3. isEmpty(Collection items)
  4. isEmpty(Collection c)
  5. isEmpty(final Collection values)
  6. isEmpty(final Collection collection)
  7. isEmpty(final Collection collection)
  8. isEmpty(final Collection collection)
  9. isEmpty(final Collection collection)