Android Collection Empty Check isNullOrEmpty(Collection collection)

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

Description

is Null Or Empty

Parameter

Parameter Description
collection a parameter

Declaration

public static boolean isNullOrEmpty(Collection collection) 

Method Source Code

//package com.java2s;
import java.util.Collection;

public class Main {
    /**/*from  w w  w.j  av  a2s .co  m*/
     * 
     * @param collection
     * @return
     */
    public static boolean isNullOrEmpty(Collection collection) {
        if (collection == null || collection.isEmpty()) {
            return true;
        }

        return false;
    }
}

Related

  1. isNotEmpty(Collection collection)
  2. isNotEmpty(Collection list)
  3. isNotNull(Collection coll)
  4. isNotNull(Collection collection)
  5. isNull(Collection coll)
  6. isEmpty(Collection collection)
  7. isEmpty(Collection collection)
  8. isEmptyCollection(Collection collection)