Java Array Empty Check isEmpty(E[] array)

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

Description

is Empty

License

Open Source License

Declaration

private static <E> boolean isEmpty(E[] array) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    private static <E> boolean isEmpty(Collection<E> collection) {

        return (collection == null || collection.isEmpty());
    }//from   www. j  a v  a2 s.c  o m

    private static <E> boolean isEmpty(E[] array) {

        return (array == null || array.length == 0);
    }
}

Related

  1. getNonemptySubsets(Object[] objects)
  2. getWithoutEmptyParams(String[] cmdarray)
  3. hasOneEmpty(String[] args)
  4. isEmpty(boolean[] values)
  5. isEmpty(byte[] array)
  6. isEmpty(final int[] arr)
  7. isEmpty(final Object[] array)
  8. isEmpty(final X[] array)
  9. isEmpty(int[] array)