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;

import java.util.*;

public class Main {

    public static boolean isNotEmpty(Collection<?> collection) {
        return (collection != null && !collection.isEmpty());
    }//  ww  w .j  av a  2s .co m

    public static boolean isNotEmpty(Set<?> set) {
        return (set != null && !set.isEmpty());
    }

    public static boolean isNotEmpty(Map<?, ?> map) {
        return (map != null && !map.isEmpty());
    }

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

    public static boolean isEmpty(Map<?, ?> map) {
        return (map == null || map.isEmpty());
    }

    public static boolean isEmpty(Set<?> set) {
        return (set == null || set.isEmpty());
    }
}

Related

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