Java Array Empty Check isEmpty(T[] array)

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

Description

is Empty

License

Apache License

Declaration

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

Method Source Code

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

import java.util.*;

public class Main {

    public static <T> boolean isEmpty(T[] array) {
        return array == null || array.length == 0;
    }//from   www  .j  ava2s  .  com

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

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

Related

  1. isEmpty(Object[] values)
  2. isEmpty(String[] array)
  3. isEmpty(T[] arr)
  4. isEmpty(T[] arr)
  5. isEmpty(T[] array)
  6. isEmpty(T[] array)
  7. isEmpty(T[] array)
  8. isEmpty(T[] array)
  9. isEmpty(T[] array)