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

cn.zkdcloud.util.AssertUtil Maven / Gradle / Ivy

The newest version!
package cn.zkdcloud.util;

import java.util.Collection;

/**
 * @author zk
 * @version 2017/8/22
 */
public class AssertUtil {

    /**
     *  判断集合是否为空
     * @param collection collection
     * @return is null?
     */
    public static boolean isNullOrEmpty(Collection collection){
        return collection == null || collection.isEmpty() ? true : false;
    }

    /**
     * 判断Obj是否为空
     * @param obj obj
     * @return is null?
     */
    public static boolean isNullOrEmpty(Object obj){
        return obj == null ? true : false;
    }

    /**
     * 判断String[] 是否为空
     * @param strings strs
     * @return is null?
     */
    public static boolean isNullOrEmpty(String[] strings){
        return strings == null || strings.length == 0 ? true : false;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy