Java Array Empty Check isEmpty(Object[] array)

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

Description

is Empty

License

Apache License

Declaration

public static boolean isEmpty(Object[] array) 

Method Source Code

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

import java.util.Collection;
import java.util.List;

public class Main {

    public static boolean isEmpty(Collection collection) {
        if (collection == null)
            return true;
        return collection.isEmpty();
    }//from w w  w . ja va  2s  . c o  m

    public static boolean isEmpty(Object[] array) {
        if (array == null || array.length == 0) {
            return true;
        }
        return false;
    }

    public static boolean isEmpty(List list) {
        if (list == null)
            return true;
        return list.isEmpty();
    }
}

Related

  1. isEmpty(Object[] array)
  2. isEmpty(Object[] array)
  3. isEmpty(Object[] array)
  4. isEmpty(Object[] array)
  5. isEmpty(Object[] array)
  6. isEmpty(Object[] array)
  7. isEmpty(Object[] array)
  8. isEmpty(Object[] array)
  9. isEmpty(Object[] arrs)