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