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.Collection;

public class Main {

    public static <T> boolean isNotEmpty(T[] array) {
        return false == isEmpty(array);
    }//from  www . ja  va  2  s.com

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

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

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

Related

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