Here you can find the source of isEmpty(final Collection> collection)
Parameter | Description |
---|---|
collection | the collection to be tested. |
public static boolean isEmpty(final Collection<?> collection)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { /**// w ww . j a va 2 s . com * Returns true if the collection is null or empty; false otherwise. * * @param collection * the collection to be tested. * @return true if the collection is null or empty; false otherwise. */ public static boolean isEmpty(final Collection<?> collection) { return collection == null || collection.isEmpty(); } }