io.github.stylesmile.tool.CollectionUtil Maven / Gradle / Ivy
package io.github.stylesmile.tool;
import java.util.Collection;
import java.util.Map;
/**
* 集合判断空
*
* @author chenye
*/
public class CollectionUtil {
public static boolean isEmpty(Collection datas) {
return datas == null || datas.isEmpty();
}
public static boolean isEmpty(Map, ?> map) {
return map == null || map.isEmpty();
}
public static boolean isNotEmpty(Collection datas) {
return !isEmpty(datas);
}
}