Here you can find the source of isNotEmpty(E collection)
public static <E extends Collection> boolean isNotEmpty(E collection)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static <E extends Collection> boolean isNotEmpty(E collection) { if (collection == null) return false; if (collection.isEmpty()) return false; return true; }// w ww . ja v a 2s .com public static <E extends Collection> boolean isEmpty(E collection) { return collection == null || collection.isEmpty(); } public static boolean isEmpty(String str) { return str == null || str.length() == 0; } }