/**
 * Copyright (c) 2016-2019  All rights reserved.
 *
 *
 *
 *
 */

package com.maxbox.common.validator;

import com.maxbox.common.exception.RRException;
import org.apache.commons.lang.StringUtils;

/**
 * 数据校验
 *
 * @author pgh xiaopeng2260@sina.com
 */
public abstract class Assert {

    public static void isBlank(String str, String message) {
        if (StringUtils.isBlank(str)) {
            throw new RRException(message);
        }
    }

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