public class CheckedUtil extends Object
| 构造器和说明 |
|---|
CheckedUtil() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
isFalse(boolean expression,
int errorCode,
String errorMsg)
是false抛出异常
|
static void |
isFalseObject(Boolean expression,
int errorCode,
String errorMsg)
是false抛出异常 是null 抛出异常
|
static void |
isIntEqualInt(int integer,
int integer2,
int errorCode,
String errorMsg)
integer == integer2抛出异常
|
static void |
isIntGTInt(int integer,
int integer2,
int errorCode,
String errorMsg)
integer 大于 integer2抛出异常
|
static void |
isIntNotRangeInt(int integer,
int min,
int max,
int errorCode,
String errorMsg)
integer 小于 min || integer 大于 max,抛出异常
|
static void |
isNotNull(Object expression,
int errorCode,
String errorMsg)
不是null抛出异常
|
static void |
isNotNullAndNotEmpty(String expression,
int errorCode,
String errorMsg)
String不是null并且不是空抛出异常
|
static void |
isNull(Object expression,
int errorCode,
String errorMsg)
是null抛出异常
|
static void |
isNullAndEmpty(String expression,
int errorCode,
String errorMsg)
String是null或者是空抛出异常
|
static void |
isNullAndSize(List<?> expression,
int errorCode,
String errorMsg)
list是null或者小于0抛出异常
|
static void |
isNullAndSize(Map<?,?> expression,
int errorCode,
String errorMsg)
Map是null或者小于0抛出异常
|
static void |
isNullAndSize(Object[] expression,
int errorCode,
String errorMsg)
数组是null或者小于1抛出异常
|
static void |
isStringEqualString(String string1,
String string2,
int errorCode,
String errorMsg) |
static void |
isTrue(boolean expression,
int errorCode,
String errorMsg)
是true抛出异常
|
static void |
isTrueObject(Boolean expression,
int errorCode,
String errorMsg)
是true抛出异常 是null 抛出异常
|
static void |
notStringEqualString(String string1,
String string2,
int errorCode,
String errorMsg)
string1 !
|
public static void isFalse(boolean expression,
int errorCode,
String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isTrue(boolean expression,
int errorCode,
String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isFalseObject(Boolean expression, int errorCode, String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isTrueObject(Boolean expression, int errorCode, String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isNull(Object expression, int errorCode, String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isNotNull(Object expression, int errorCode, String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isNullAndSize(List<?> expression, int errorCode, String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isNullAndSize(Object[] expression, int errorCode, String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isNullAndSize(Map<?,?> expression, int errorCode, String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isNullAndEmpty(String expression, int errorCode, String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isNotNullAndNotEmpty(String expression, int errorCode, String errorMsg)
expression - 需要判断的值errorCode - 失败codeerrorMsg - 失败信息public static void isStringEqualString(String string1, String string2, int errorCode, String errorMsg)
string1 - 需要判断的值1string2 - 需要判断的值2errorCode - 失败codeerrorMsg - 失败信息public static void notStringEqualString(String string1, String string2, int errorCode, String errorMsg)
string1 - 需要判断的值1string2 - 需要判断的值2errorCode - 失败codeerrorMsg - 失败信息public static void isIntEqualInt(int integer,
int integer2,
int errorCode,
String errorMsg)
integer - 需要判断的值1integer2 - 需要判断的值2errorCode - 失败codeerrorMsg - 失败信息public static void isIntNotRangeInt(int integer,
int min,
int max,
int errorCode,
String errorMsg)
integer - 需要判断的值1min - 需要判断的值2max - 需要判断的值2errorCode - 失败codeerrorMsg - 失败信息public static void isIntGTInt(int integer,
int integer2,
int errorCode,
String errorMsg)
integer - 需要判断的值1integer2 - 需要判断的值2errorCode - 失败codeerrorMsg - 失败信息Copyright © 2017. All rights reserved.