Java Collection Empty isNotEmpty(Collection collection)

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

Description

is Not Empty

License

Open Source License

Declaration

public static boolean isNotEmpty(Collection<?> collection) 

Method Source Code


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

import java.util.*;

public class Main {

    public static boolean isNotEmpty(Map<?, ?> map) {

        if (null != map && map.size() > 0)
            return true;
        return false;
    }//from www. jav a2s.  c  om

    public static boolean isNotEmpty(Collection<?> collection) {

        return !isEmpty(collection);
    }

    public static boolean isEmpty(Collection<?> collection) {

        if (null == collection || collection.isEmpty() || collection.size() <= 0)
            return true;
        return false;
    }

    public static boolean isEmpty(Map<?, ?> map) {

        if (null == map || map.isEmpty() || map.size() <= 0)
            return true;
        return false;
    }
}

Related

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