Java tutorial
//package com.java2s; //License from project: Apache License import java.util.Map; public class Main { /** * Checks a map for either being empty or containing objects within it * @param myMap map to check * @return Boolean, true if it is null or empty, false it if is not */ public static boolean isMapNullOrEmpty(Map<?, ?> myMap) { if (myMap == null) { return true; } if (myMap.size() <= 0) { return true; } return false; } }