public final class PreConditions extends Object
Modifier and Type | Method and Description |
---|---|
static void |
assertParamNotEmpty(Collection<?> paramValue,
Object messageType,
String messageKey,
Object[] messageParameters)
Asserts that a parameter is not empty.
|
static <Param> void |
assertParamNotEmpty(Param[] paramValue,
Object messageType,
String messageKey,
Object[] messageParameters)
Asserts that a parameter is not empty.
|
static void |
assertParamNotEmpty(String param,
Collection<?> paramValue)
Asserts that a parameter is not empty.
|
static void |
assertParamNotEmpty(String paramValue,
Object messageType,
String messageKey,
Object[] messageParameters)
Asserts that a parameter is not empty.
|
static <Param> void |
assertParamNotEmpty(String param,
Param[] paramValue)
Asserts that a parameter is not empty.
|
static void |
assertParamNotEmpty(String param,
String paramValue)
Asserts that a parameter is not empty.
|
static void |
assertParamNotNull(Object paramValue,
Object messageType,
String messageKey,
Object[] messageParameters)
Asserts that a parameter is not null.
|
static void |
assertParamNotNull(String param,
Object paramValue)
Asserts that a parameter is not null.
|
static void |
assertParamValid(Boolean expression,
Object messageType,
String messageKey,
Object[] messageParameters)
Asserts that a parameter is valid.
|
static void |
assertParamValid(Boolean expression,
String param,
Object paramValue)
Asserts that a parameter is valid.
|
public static void assertParamValid(Boolean expression, Object messageType, String messageKey, Object[] messageParameters)
expression
- Expression to check if the parameter is valid.messageType
- The type of the message for the invalid parameter.messageKey
- The key of the message for the invalid parameter.messageParameters
- The parameters of the message for the invalid parameter.public static void assertParamValid(Boolean expression, String param, Object paramValue)
expression
- Expression to check if the parameter is valid.param
- Parameter being checked.paramValue
- Parameter value.public static void assertParamNotNull(Object paramValue, Object messageType, String messageKey, Object[] messageParameters)
paramValue
- The parameter value.messageType
- The type of the message for the invalid parameter.messageKey
- The key of the message for the invalid parameter.messageParameters
- The parameters of the message for the invalid parameter.public static void assertParamNotNull(String param, Object paramValue)
param
- Parameter being checked.paramValue
- Parameter value.public static void assertParamNotEmpty(String paramValue, Object messageType, String messageKey, Object[] messageParameters)
paramValue
- The parameter value.messageType
- The type of the message for the invalid parameter.messageKey
- The key of the message for the invalid parameter.messageParameters
- The parameters of the message for the invalid parameter.public static void assertParamNotEmpty(String param, String paramValue)
param
- Parameter being checked.paramValue
- Parameter value.public static void assertParamNotEmpty(Collection<?> paramValue, Object messageType, String messageKey, Object[] messageParameters)
paramValue
- The parameter value.messageType
- The type of the message for the invalid parameter.messageKey
- The key of the message for the invalid parameter.messageParameters
- The parameters of the message for the invalid parameter.public static void assertParamNotEmpty(String param, Collection<?> paramValue)
param
- Parameter being checked.paramValue
- Parameter value.public static <Param> void assertParamNotEmpty(Param[] paramValue, Object messageType, String messageKey, Object[] messageParameters)
Param
- Any parameter type.paramValue
- The parameter value.messageType
- The type of the message for the invalid parameter.messageKey
- The key of the message for the invalid parameter.messageParameters
- The parameters of the message for the invalid parameter.public static <Param> void assertParamNotEmpty(String param, Param[] paramValue)
Param
- Any parameter type.param
- Parameter being checked.paramValue
- Parameter value.Copyright © 2013. All Rights Reserved.