Here you can find the source of isNotEmpty(Collection> collection)
public static boolean isNotEmpty(Collection<?> collection)
//package com.java2s; //License from project: LGPL import java.util.Collection; import java.util.Map; public class Main { /**//from w w w . j a va 2 s. c o m * @return true if there is at least one item in the map, false otherwise */ public static boolean isNotEmpty(Map<?, ?> map) { return map != null && !map.isEmpty(); } /** * @return true if there is at least one item in the collection, false otherwise */ public static boolean isNotEmpty(Collection<?> collection) { return collection != null && !collection.isEmpty(); } /** * @return true if there the string length greater than 0, false otherwise */ public static boolean isNotEmpty(final CharSequence string) { return string != null && string.length() > 0; } }