Here you can find the source of isNullOrEmpty(Collection> collection)
public static boolean isNullOrEmpty(Collection<?> collection)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static boolean isNullOrEmpty(String str) { return str == null || "".equals(str.trim()) || "null".equalsIgnoreCase(str.trim()) || "undefined".equalsIgnoreCase(str.trim()); }//from ww w . j a v a2s .c om public static boolean isNullOrEmpty(Object obj) { return obj == null || isNullOrEmpty(obj.toString()); } public static boolean isNullOrEmpty(Collection<?> collection) { return collection == null || collection.isEmpty(); } }