Here you can find the source of isEmpty(final Collection> value)
Parameter | Description |
---|---|
value | Value to test. Does not check to see if it is null. |
public static boolean isEmpty(final Collection<?> value)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { /**/*w w w .j a va 2 s. com*/ * Tests given value to see if it is empty. * * @param value * Value to test. Does not check to see if it is null. * @return True if empty. */ public static boolean isEmpty(final Collection<?> value) { return 0 == value.size(); } /** * Tests given value to see if it is empty. * * @param value * Value to test. Does not check to see if it is null. * @return True if empty. */ public static boolean isEmpty(final Object[] value) { return 0 == value.length; } /** * Tests given value to see if it is empty. * * @param value * Value to test. Does not check to see if it is null. * @return True if empty. */ public static boolean isEmpty(final String value) { return 0 == value.length(); } }