package com.heyu.api.data.utils;

import java.util.Collection;
import java.util.Map;

public class CollectionUtils {

    public static boolean notContainsKey(Map map, Object key) {
        if(map == null){
            return true;
        }

        return !map.containsKey(key);
    }

    /***
     * 如果不是空
     * @param collection
     * @return
     */
    public static boolean isNotEmpty(Collection collection) {
        if(collection == null){
            return false;
        }
        if(org.springframework.util.CollectionUtils.isEmpty(collection)){
            return false;
        }
        return true;
    }


    /***
     * 如果不是空
     * @param collection
     * @return
     */
    public static boolean isEmpty(Collection collection) {

        return !isNotEmpty(collection);
    }


}
