Here you can find the source of isEmptyCollection(Collection collection)
public static boolean isEmptyCollection(Collection collection)
//package com.java2s; import java.util.Collection; public class Main { public static boolean isEmptyCollection(Collection collection) { return (collection == null) || collection.isEmpty(); }/*from w ww . j a va 2 s.com*/ public static final boolean isEmpty(String input) { if (input == null || "".equals(input)) return true; for (int i = 0; i < input.length(); i++) { char c = input.charAt(i); if (c != ' ' && c != '\t' && c != '\r' && c != '\n') { return false; } } return true; } public static boolean isEmpty(Object object) { return toString(object).isEmpty(); } public static <T> boolean isEmpty(T[] array) { return (array == null) || (array.length == 0); } public static String toString(Object object) { return (object == null) ? "" : object.toString(); } }