com.dahuatech.icc.util.CollectionUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-common Show documentation
Show all versions of java-sdk-common Show documentation
Dahua ICC Open API SDK for Java
package com.dahuatech.icc.util;
import java.util.Collection;
import java.util.Map;
/**
* 集合相关工具类
*
* @author 232676
* @since 1.0.0 2020-10-24 20:59:11
*/
public class CollectionUtil {
/**
* 集合是否为空
*
* @param collection 集合
* @return 是否为空
*/
public static boolean isEmpty(Collection> collection) {
return collection == null || collection.isEmpty();
}
/**
* Map是否为空
*
* @param map 集合
* @return 是否为空
*/
public static boolean isEmpty(Map, ?> map) {
return null == map || map.isEmpty();
}
}