Java Collection Empty isCollectionEmpty(Collection value)

Here you can find the source of isCollectionEmpty(Collection value)

Description

is Collection Empty

License

Open Source License

Declaration

public static boolean isCollectionEmpty(Collection<?> value) 

Method Source Code

//package com.java2s;
/**/*from  w w w.j  a  v  a 2  s . c o m*/
 * Copyright (c)2010-2011 Enterprise Website Content Management System(EWCMS), All rights reserved.
 * EWCMS PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 * http://www.ewcms.com
 */

import java.util.Collection;

public class Main {

    public static boolean isCollectionEmpty(Collection<?> value) {
        if (isNull(value)) {
            return true;
        }
        return value.isEmpty();
    }

    public static boolean isNull(Object value) {
        return value == null ? true : false;
    }
}

Related

  1. emptyToNull(final Collection value)
  2. getSingletonCollectionOrEmptyIfNull(T o)
  3. isAnyEmpty(Collection... collections)
  4. isCollectionEmpty(Collection collection)
  5. isCollectionEmpty(Collection oneCol)
  6. isCollectionNotEmpty(Collection collection)
  7. isCollectionNullOrEmpty(Collection collection)
  8. isEmpty(Collection c)
  9. isEmpty(Collection c)