Java Collection Empty isNotEmpty(Collection... colls)

Here you can find the source of isNotEmpty(Collection... colls)

Description

is Not Empty

License

Open Source License

Declaration

public static boolean isNotEmpty(Collection<?>... colls) 

Method Source Code

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

import java.util.*;

public class Main {

    public static boolean isNotEmpty(Collection<?>... colls) {
        return !isEmpty(colls);
    }/*  w w  w .  jav a  2  s. co m*/

    public static boolean isNotEmpty(Map<?, ?>... maps) {
        return !isEmpty(maps);
    }

    public static final boolean isNotEmpty(Collection<?> c) {
        return null != c && !c.isEmpty();
    }

    @SuppressWarnings("unchecked")
    public static final boolean isEmpty(Collection c) {
        return null == c || 0 == c.size() ? true : false;
    }

    public static boolean isEmpty(Collection<?>... colls) {
        boolean result = false;

        for (Collection<?> coll : colls) {
            if (null == coll || coll.isEmpty()) {
                result = true;
                break;
            }
        }

        return result;
    }

    public static boolean isEmpty(Map<?, ?>... maps) {
        boolean result = false;

        for (Map<?, ?> map : maps) {
            if (null == map || map.isEmpty()) {
                result = true;
                break;
            }
        }

        return result;
    }
}

Related

  1. isNotEmpty(Collection collection)
  2. isNotEmpty(Collection collection)
  3. isNotEmpty(Collection collection)
  4. isNotEmpty(Collection source)
  5. isNotEmpty(Collection values)
  6. isNotEmpty(Collection collection)
  7. isNotEmpty(Collection collection)
  8. isNotEmpty(Collection values)
  9. isNotEmpty(E collection)