避免寫兩個判斷spring
org.springframework.util.CollectionUtils.net
方法:blog
public static boolean isEmpty(Collection collection)
{
return collection == null || collection.isEmpty();
}io
public static boolean isEmpty(Map map)
{
return map == null || map.isEmpty();
}
---------------------
原文:https://blog.csdn.net/sinosoft12345/article/details/54614005 map