cn.t.util.common.CollectionUtil Maven / Gradle / Ivy
package cn.t.util.common;
import java.util.Collection;
import java.util.Map;
public class CollectionUtil {
public static boolean isEmpty(Collection> collection) {
return (collection == null || collection.isEmpty());
}
public static boolean isEmpty(Map, ?> map) {
return (map == null || map.isEmpty());
}
public static boolean isSizeEqualAndGreaterThan(Collection> collection, int size) {
return collection != null && collection.size() >= size;
}
public static boolean isSizeEqualAndLessThan(Collection> collection, int size) {
return collection == null || collection.size() <= size;
}
}