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

@SuppressWarnings("rawtypes")
public static boolean isNotEmpty(Collection collection) 

Method Source Code

//package com.java2s;

import java.util.Collection;

import java.util.Map;

public class Main {

    @SuppressWarnings("rawtypes")
    public static boolean isNotEmpty(Map map) {
        return !isEmpty(map);
    }/*from  w w w .  j a va 2  s  . c  o m*/

    @SuppressWarnings("rawtypes")
    public static boolean isNotEmpty(Collection collection) {
        return !isEmpty(collection);
    }

    public static boolean isNotEmpty(Object[] objs) {
        return !isEmpty(objs);
    }

    @SuppressWarnings("rawtypes")
    public static boolean isEmpty(Map map) {
        if (map == null || map.size() == 0) {
            return true;
        }
        return false;
    }

    @SuppressWarnings("rawtypes")
    public static boolean isEmpty(Collection collection) {
        if (collection == null || collection.size() == 0) {
            return true;
        }
        return false;
    }

    public static boolean isEmpty(Object[] objs) {
        if (objs == null || objs.length == 0) {
            return true;
        }
        return false;
    }
}

Related

  1. isNonEmpty(final Collection values)
  2. isNotEmpty(@SuppressWarnings("rawtypes") Collection collection)
  3. isNotEmpty(Collection c)
  4. isNotEmpty(Collection collection)
  5. isNotEmpty(Collection collection)
  6. isNotEmpty(Collection collection)
  7. isNotEmpty(Collection collection)
  8. isNotEmpty(Collection collection)
  9. isNotEmpty(Collection collection)