Here you can find the source of isNotEmpty(final Collection> coll)
Parameter | Description |
---|---|
coll | a collection |
public static boolean isNotEmpty(final Collection<?> coll)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { /**//from w ww. j a va2s . c o m * Return if a collection is not empty. * * @param coll a collection * @return whether it is not empty */ public static boolean isNotEmpty(final Collection<?> coll) { return !isEmpty(coll); } /** * 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; } }