Here you can find the source of isEmpty(final Collection> coll)
Parameter | Description |
---|---|
coll | a collection |
public static boolean isEmpty(final Collection<?> coll)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { /**/*from w ww . ja va2s. c o m*/ * Return if a collection is empty. * * @param coll a collection * @return whether it is empty */ public static boolean isEmpty(final Collection<?> coll) { return coll == null || coll.isEmpty(); } private static boolean isEmpty(final CharSequence cs) { return cs == null || cs.length() == 0; } }