Package com.luna.common.check
Class Preconditions
java.lang.Object
com.luna.common.check.Preconditions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
check
(boolean expression, ResultEnum error) 校验表达式是否正确static void
checkExpression
(boolean expression, ResultEnum resultEnum) static void
checkExpression
(boolean expression, String msg) static <T> T
checkNotNull
(T reference, ResultEnum bizErrorEnum) static <T> T
checkNotNull
(T reference, String errorMessage) static <T> T
checkParamNotNull
(T reference) static void
triggerException
(String message)
-
Constructor Details
-
Preconditions
public Preconditions()
-
-
Method Details
-
check
校验表达式是否正确- Parameters:
expression
-error
- FxErrorCode枚举
-
checkExpression
-
checkExpression
-
checkNotNull
-
checkNotNull
-
checkParamNotNull
public static <T> T checkParamNotNull(T reference) -
triggerException
-