Here you can find the source of isEmpty(Collection collection)
@SuppressWarnings("rawtypes") public static boolean isEmpty(Collection collection)
//package com.java2s; import java.util.Collection; import java.util.Map; public class Main { @SuppressWarnings("rawtypes") public static boolean isEmpty(Map map) { if (map == null || map.size() == 0) { return true; }// www .j a v a 2 s . com return false; } @SuppressWarnings("rawtypes") public static boolean isEmpty(Collection collection) { if (collection == null || collection.size() == 0) { return true; } return false; } public static boolean isEmpty(Object[] objs) { if (objs == null || objs.length == 0) { return true; } return false; } }