Here you can find the source of isNotEmpty(Collection> c)
public static boolean isNotEmpty(Collection<?> c)
//package com.java2s; import java.util.Collection; public class Main { public static boolean isNotEmpty(String s) { return ((s != null) && (s.trim().length() > 0)); }/*from w w w . j a v a 2s . c o m*/ public static boolean isNotEmpty(Collection<?> c) { return ((c != null) && (c.size() > 0)); } public static boolean isNotEmpty(Object obj) { if (obj == null) return false; if (obj instanceof String) return isNotEmpty((String) obj); if (obj instanceof Collection) return isNotEmpty((Collection<?>) obj); return true; } }