Java tutorial
//package com.java2s; //License from project: LGPL import java.util.Collection; import java.util.Map; public class Main { public static boolean isEmpty(Collection col) { return col == null || col.size() == 0; } public static <K, V> boolean isEmpty(Map<K, V> map) { return map == null || map.size() == 0; } }