isEmpty() for any collection

This commit is contained in:
Anna Kozlova
2014-07-02 16:35:20 +02:00
parent 7b958c427b
commit 26a7fdda38
@@ -2061,8 +2061,8 @@ public class ContainerUtil extends ContainerUtilRt {
}
@Contract("null -> true")
public static <T> boolean isEmpty(List<T> list) {
return list == null || list.isEmpty();
public static <T> boolean isEmpty(Collection<T> collection) {
return collection == null || collection.isEmpty();
}
private interface ConcurrentMapFactory {