All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.t.util.common.CollectionUtil Maven / Gradle / Ivy

There is a newer version: 1.0.16.RELEASE
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy