public class CommonParamCheckUtils extends Object
| Constructor and Description |
|---|
CommonParamCheckUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
AssertExceed(String objName,
int value,
int limit)
判断参数是否超出阈值,如果是,抛出参数异常
|
static void |
AssertNotNull(String objName,
Object obj)
判断参数是否为NULL,如果为NULL,抛出参数异常
|
static void |
AssertNotZero(String objName,
int value)
判断整数参数是否为0,如果为0,抛出参数异常
|
public static void AssertNotNull(String objName, Object obj) throws ParamException
objName - 参数名obj - 参数对象ParamException - 参数异常public static void AssertNotZero(String objName, int value) throws ParamException
objName - 参数名value - 参数值ParamException - 参数异常public static void AssertExceed(String objName, int value, int limit) throws ParamException
objName - 参数名value - 参数值limit - 参数阈值ParamException - 参数异常Copyright © 2019. All rights reserved.