Here you can find the source of isEmpty(Collection extends Object> col)
public static boolean isEmpty(Collection<? extends Object> col)
//package com.java2s; //License from project: Apache License import java.util.Collection; import java.util.Map; public class Main { public static boolean isEmpty(Collection<? extends Object> col) { return !isNotEmpty(col); }//from w w w . j av a 2s .c om public static boolean isEmpty(Map<? extends Object, ? extends Object> map) { return map == null || map.isEmpty(); } public static boolean isNotEmpty(Collection<? extends Object> col) { return col != null && col.size() > 0; } public static boolean isNotEmpty(Map<? extends Object, ? extends Object> map) { return map != null && map.size() > 0; } }