Java tutorial
//package com.java2s; //License from project: Apache License import java.util.List; import java.util.Map; public class Main { public static <T> boolean isEmpty(List<T> list) { return (list != null && list.size() == 0); } public static <T, T2> boolean isEmpty(Map<T, T2> map) { return (map != null && map.size() == 0); } }