Here you can find the source of isEmpty(Collection collection)
@SuppressWarnings("rawtypes") public static boolean isEmpty(Collection collection)
//package com.java2s; //License from project: Apache License import java.util.Collection; import java.util.Map; public class Main { @SuppressWarnings("rawtypes") public static boolean isEmpty(Collection collection) { return (collection == null) || collection.isEmpty(); }//from w ww .j a va 2 s.c om @SuppressWarnings("rawtypes") public static boolean isEmpty(Map map) { return (map == null) || map.isEmpty(); } }