Here you can find the source of isNotEmpty(Collection collection)
@SuppressWarnings("rawtypes") public static Boolean isNotEmpty(Collection collection)
//package com.java2s; //License from project: Open Source License import java.util.Collection; public class Main { @SuppressWarnings("rawtypes") public static Boolean isNotEmpty(Collection collection) { return !collection.isEmpty(); }// w w w . j a v a2s. c o m /** * Verifica se um objeto é vazio. * * @param obj * @return <b>true</b> se o objeto for vazio(empty). */ public static boolean isEmpty(Object obj) { if (obj == null) return true; if (obj instanceof Collection) return ((Collection<?>) obj).size() == 0; final String s = String.valueOf(obj).trim(); return s.length() == 0 || s.equalsIgnoreCase("null"); } @SuppressWarnings("rawtypes") public static Boolean isEmpty(Collection collection) { return collection.isEmpty(); } }