Here you can find the source of isEmpty(final Object[] array)
Parameter | Description |
---|---|
array | array to test |
public static boolean isEmpty(final Object[] array)
//package com.java2s; import java.util.Collection; import java.util.Map; public class Main { /**/*www. ja v a 2 s . c o m*/ * Is the given map null or empty ? * * @param map map to test * @return true if the map is null or empty */ public static boolean isEmpty(final Map<?, ?> map) { return map == null || map.isEmpty(); } /** * Is the given collection null or empty ? * * @param col collection to test * @return true if the collection is null or empty */ public static boolean isEmpty(final Collection<?> col) { return col == null || col.isEmpty(); } /** * Is the given array null or empty ? * * @param array array to test * @return true if the array is null or empty */ public static boolean isEmpty(final Object[] array) { return array == null || array.length == 0; } }