避免写两个判断

org.springframework.util.CollectionUtils

方法:

public static boolean isEmpty(Collection collection)
{
return collection == null || collection.isEmpty();
}

public static boolean isEmpty(Map map)
{
return map == null || map.isEmpty();
}
---------------------
原文:https://blog.csdn.net/sinosoft12345/article/details/54614005

05-11 13:50