Here you can find the source of isNotEmpty(Collection
public static <T> boolean isNotEmpty(Collection<T> collection)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { /**/* w w w . jav a 2 s. c om*/ * @return TRUE if string != null && string.length() > 0 */ public static <T> boolean isNotEmpty(String string) { return string != null && string.length() > 0; } /** * @see ObjectUtils#isEmpty(Collection) */ public static <T> boolean isNotEmpty(Collection<T> collection) { return !isEmpty(collection); } /** * @return TRUE is collection is null or contains no elements */ public static <T> boolean isEmpty(Collection<T> collection) { return collection == null || collection.size() == 0; } /** * @return TRUE if string == null || string.length() == 0 */ public static <T> boolean isEmpty(String string) { return string == null || string.length() == 0; } }