public final class ParametersChecker extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkParameter(String errorMessage,
Object... parameters)
Check if any parameter are null and if so, throw an IllegalArgumentException
|
static void |
checkParameter(String errorMessage,
String... parameters)
Check if any parameter are null or empty and if so, throw an IllegalArgumentException
|
static void |
checkParameterDefault(String errorMessage,
Object... parameters)
Check if any parameter are null or empty and if so, throw an IllegalArgumentException
|
static void |
checkParameterDefault(String errorMessage,
String... parameters)
Check if any parameter are null or empty and if so, throw an IllegalArgumentException
|
static void |
checkParameterNullOnly(String errorMessage,
String... parameters)
Check if any parameter are null and if so, throw an IllegalArgumentException
|
static void |
checkValue(String name,
long variable,
long minValue)
Check if an integer parameter is greater or equals to minValue
|
static boolean |
isNotEmpty(String... parameters)
Check if any parameter are null or empty and if so, return false
|
public static final void checkParameter(String errorMessage, String... parameters)
errorMessage
- the error messageparameters
- parameters to be checkedIllegalArgumentException
- if null or emptypublic static final void checkParameterDefault(String errorMessage, String... parameters)
errorMessage
- the error messageparameters
- set of parametersIllegalArgumentException
- if null or emptypublic static final boolean isNotEmpty(String... parameters)
parameters
- set of parameterspublic static final void checkParameterDefault(String errorMessage, Object... parameters)
errorMessage
- the error messageparameters
- set of parametersIllegalArgumentException
- if null or emptypublic static final void checkParameterNullOnly(String errorMessage, String... parameters)
errorMessage
- the error messageparameters
- parameters to be checkedIllegalArgumentException
- if nullpublic static final void checkParameter(String errorMessage, Object... parameters)
errorMessage
- set of parametersparameters
- set parameters to be checkedIllegalArgumentException
- if nullpublic static final void checkValue(String name, long variable, long minValue)
name
- name of the variablevariable
- the value of variable to checkminValue
- the min valueCopyright © 2018 Vitam. All rights reserved.