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

public class Main {
    /***********************************************************************/
    public static boolean isEmpty(Object[] array) {
        return getArrayLength(array) == 0;
    }/*from w w w. ja  v a  2  s .  c  o m*/

    /***********************************************************************/
    public static boolean isEmpty(List list) {
        return (list == null || list.size() == 0);
    }

    /***********************************************************************/
    public static int getArrayLength(Object[] array) {
        return array == null ? 0 : array.length;
    }
}

Related

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