Java Array Empty Check isNotNullOrEmpty(T[] array)

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

Description

is Not Null Or Empty

License

Apache License

Declaration

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

Method Source Code


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

import java.util.Collection;

import java.util.Map;

public class Main {
    public static boolean isNotNullOrEmpty(Collection<?> collection) {
        return !isNullOrEmpty(collection);
    }/*from   ww w. jav a 2 s . c o  m*/

    public static boolean isNotNullOrEmpty(Map<?, ?> map) {
        return !isNullOrEmpty(map);
    }

    public static <T> boolean isNotNullOrEmpty(T[] array) {
        return !isNullOrEmpty(array);
    }

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

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

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

Related

  1. isNotEmpty(T[] array)
  2. isNotEmpty(T[] array)
  3. isNotEmpty(T[] array)
  4. isNotEmpty(T[] array)
  5. isNotNullAndNotEmpty(final Object[] array)
  6. isNullOrEmpty(Object[] array)
  7. isNullOrEmpty(String[] s)
  8. isNullOrEmpty(T[] array)
  9. isNullOrEmptyOrFirstElementBlank(String[] values)