Java tutorial
//package com.java2s; import java.util.Map; public class Main { @SuppressWarnings("rawtypes") public static boolean isNotEmpty(Map map) { boolean result = false; if (null != map && 0 < map.size()) { result = true; } return result; } public static boolean isNotEmpty(String string) { boolean result = false; if (null != string && 0 < string.length()) { result = true; } return result; } }