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

com.github.datalking.util.Assert Maven / Gradle / Ivy

package com.github.datalking.util;

/**
 * 判断型工具类
 *
 * @author yaoo on 4/3/18
 */
public interface Assert {


    static void notNull(Object object, String message) {
        if (object == null) {
            throw new IllegalArgumentException(message);
        }
    }

    static void isNull(Object object, String message) {
        if (object != null) {
            throw new IllegalArgumentException(message);
        }
    }

    static void isNull(Object object) {
        isNull(object, "[Assertion failed] - the object argument must be null");
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy