Java Collection Empty isNotEmpty(Collection collection)

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

Description

is Not Empty

License

Apache License

Declaration

public static boolean isNotEmpty(Collection<?> collection) 

Method Source Code


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

import java.util.Collection;

public class Main {
    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }//w  w w .j  a  va 2  s .c  o  m

    public static boolean isNotEmpty(Collection<?> collection) {
        return !isEmpty(collection);
    }

    public static boolean isEmpty(String str) {
        if (null == str || "".equals(str)) {
            return true;
        }
        return false;
    }

    public static boolean isEmpty(Collection<?> collection) {
        if (null == collection || collection.isEmpty()) {
            return true;
        }
        return false;
    }
}

Related

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