Java开发中判断集合类为空的方法-转载

避免写两个判断

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

原文地址:https://www.cnblogs.com/huhuuu/p/10655808.html