Here you can find the source of isEmpty(Collection collection)
public static boolean isEmpty(Collection collection)
//package com.java2s; //License from project: Open Source License import java.util.Collection; import java.util.Map; public class Main { public static boolean isEmpty(Collection collection) { if (null == collection) return true; return collection.isEmpty(); }//from w w w . ja v a 2s . c om public static boolean isEmpty(Map collection) { if (null == collection) return true; return collection.isEmpty(); } }