Here you can find the source of isEmpty(Collection> value)
Parameter | Description |
---|---|
value | the value |
public static boolean isEmpty(Collection<?> value)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { /**//from w w w . ja va2 s . com * Checks if is empty. * * @param value * the value * @return true, if is empty */ public static boolean isEmpty(Collection<?> value) { if (value == null) return true; return value.isEmpty(); } /** * Checks if is empty. * * @param <T> * the generic type * @param value * the value * @return true, if is empty */ public static <T> boolean isEmpty(T[] value) { if (value == null) return true; return value.length == 0; } }