Java Array Empty Check isNotEmpty(T[] array)

Here you can find the source of isNotEmpty(T[] array)

Description

is Not Empty

License

Apache License

Declaration

public static <T> boolean isNotEmpty(T[] array) 

Method Source Code

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

import java.util.*;

public class Main {

    public static <T> boolean isNotEmpty(T[] array) {
        return false == isEmpty(array);
    }//  w w  w .j a  v  a 2s  . com

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

    public static <T> boolean isNotEmpty(Map<?, ?> map) {
        return false == isEmpty(map);
    }

    public static <T> boolean isEmpty(T[] array) {
        return array == null || array.length == 0;
    }

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

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

Related

  1. isNotEmpty(Object[] array)
  2. isNotEmpty(Object[] array)
  3. isNotEmpty(Object[] arrs)
  4. isNotEmpty(Object[] ObjectArray)
  5. isNotEmpty(T[] array)
  6. isNotEmpty(T[] array)
  7. isNotEmpty(T[] array)
  8. isNotEmpty(T[] array)
  9. isNotNullAndNotEmpty(final Object[] array)