// Path: src/main/java/com/wjyup/coolq/exception/PredicateException.java
// public class PredicateException extends RuntimeException{
//     private static final long serialVersionUID = 1L;
// 
//     public PredicateException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/com/wjyup/coolq/exception/UnexpectedException.java
// public class UnexpectedException extends RuntimeException {
//     private static final long serialVersionUID = 1L;
// 
//     public UnexpectedException(String message) {
//         super(message);
//     }
// 
//     public UnexpectedException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public UnexpectedException(Throwable cause) {
//         super(cause);
//     }
// }


import com.google.common.base.Strings;
import com.google.common.base.Supplier;
import com.google.common.collect.Iterables;
import com.wjyup.coolq.exception.PredicateException;
import com.wjyup.coolq.exception.UnexpectedException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
package com.wjyup.coolq.util;



public class Predicates {
    private static final Pattern IP_PATTERN = Pattern
            .compile("^([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}$");

    /**
     * 检查数值范围
     *
     * @param number 数值
     * @param min 最小值
     * @param max 最大值
     * @param msg 消息
     * @throws PredicateException
     */
// Path: src/main/java/com/wjyup/coolq/exception/PredicateException.java
// public class PredicateException extends RuntimeException{
//     private static final long serialVersionUID = 1L;
// 
//     public PredicateException(String message) {
//         super(message);
//     }
// }
// 
// Path: src/main/java/com/wjyup/coolq/exception/UnexpectedException.java
// public class UnexpectedException extends RuntimeException {
//     private static final long serialVersionUID = 1L;
// 
//     public UnexpectedException(String message) {
//         super(message);
//     }
// 
//     public UnexpectedException(String message, Throwable cause) {
//         super(message, cause);
//     }
// 
//     public UnexpectedException(Throwable cause) {
//         super(cause);
//     }
// }


// Path: src/main/java/com/wjyup/coolq/util/Predicates.java
import com.google.common.base.Strings;
import com.google.common.base.Supplier;
import com.google.common.collect.Iterables;
import com.wjyup.coolq.exception.PredicateException;
import com.wjyup.coolq.exception.UnexpectedException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Collection;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

package com.wjyup.coolq.util;



public class Predicates {
    private static final Pattern IP_PATTERN = Pattern
            .compile("^([1-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])(\\.(\\d|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])){3}$");

    /**
     * 检查数值范围
     *
     * @param number 数值
     * @param min 最小值
     * @param max 最大值
     * @param msg 消息
     * @throws PredicateException
     */
    public static void ensureNumberRange(int number, int min, int max, String msg) throws PredicateException {