Android Collection Empty Check isEmpty(Collection collection)

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

Description

is Empty

Declaration

public static boolean isEmpty(Collection<?> collection) 

Method Source Code

//package com.java2s;

import java.util.Collection;

public class Main {

    public static boolean isEmpty(Collection<?> collection) {
        if (size(collection) == 0) {
            return true;
        }/*ww w  .j  a  v a  2s .c  om*/
        return false;
    }

    /**
     * Get the size of specified collection.
     */
    public static int size(Collection<?> collection) {
        if (collection == null) {
            return 0;
        }
        return collection.size();
    }
}

Related

  1. isAnyStringEmpty( Collection collection)
  2. isEmpty(Collection collection)
  3. isEmpty(Collection coll)
  4. isEmpty(Collection coll)
  5. isEmpty(Collection collection)
  6. isEmpty(Collection collection)
  7. isEmpty(Collection list)
  8. isEmpty(Collection theCollection)
  9. isEmpty(Collection theCollection)