Here you can find the source of isEmpty(Collection> collection)
public static boolean isEmpty(Collection<?> collection)
//package com.java2s; //License from project: Apache License import java.util.Collection; public class Main { public static boolean isEmpty(String str) { if (null == str || "".equals(str)) { return true; }/*from w w w .ja v a 2s . c o m*/ return false; } public static boolean isEmpty(Collection<?> collection) { if (null == collection || collection.isEmpty()) { return true; } return false; } }