public class ExceptionUtil extends Object
| 构造器和说明 |
|---|
ExceptionUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Boolean |
isNull(Object obj)
Judge null
|
static void |
paramNull(Object obj,
String message)
判断对象是否为 null,如果是 null,抛出非法参数异常
Judge whether the object is null.
|
static void |
paramPositive(long param,
String message)
判断数字是否为正数,如果是负数,抛出非法参数异常
Judge whether the number is positive.
|
public static void paramNull(Object obj, String message)
obj - objectmessage - Custom exception messagepublic static void paramPositive(long param,
String message)
param - numbermessage - Custom exception messageCopyright © 2020. All rights reserved.