Here you can find the source of isEmpty(Collection c)
@SuppressWarnings("unchecked") public static final boolean isEmpty(Collection c)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { @SuppressWarnings("unchecked") public static final boolean isEmpty(Collection c) { return null == c || 0 == c.size() ? true : false; }/* w w w . j a v a2s . c o m*/ public static boolean isEmpty(Collection<?>... colls) { boolean result = false; for (Collection<?> coll : colls) { if (null == coll || coll.isEmpty()) { result = true; break; } } return result; } public static boolean isEmpty(Map<?, ?>... maps) { boolean result = false; for (Map<?, ?> map : maps) { if (null == map || map.isEmpty()) { result = true; break; } } return result; } }