Package com.labs64.netlicensing.util
Class CheckUtils
java.lang.Object
com.labs64.netlicensing.util.CheckUtils
Common utilities for precondition checking.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
paramNotEmpty
(String parameter, String parameterName) Ensures that a string passed as a parameter to the calling method is not null or empty.static void
paramNotNull
(Object parameter, String parameterName) Ensures that an object reference passed as a parameter to the calling method is not null.
-
Constructor Details
-
CheckUtils
public CheckUtils()
-
-
Method Details
-
paramNotNull
public static void paramNotNull(Object parameter, String parameterName) throws MalformedArgumentsException Ensures that an object reference passed as a parameter to the calling method is not null.- Parameters:
parameter
- param to checkparameterName
- name of the parameter- Throws:
MalformedArgumentsException
- if parameter is null
-
paramNotEmpty
public static void paramNotEmpty(String parameter, String parameterName) throws MalformedArgumentsException Ensures that a string passed as a parameter to the calling method is not null or empty.- Parameters:
parameter
- param to checkparameterName
- name of the parameter- Throws:
MalformedArgumentsException
- if parameter is null or empty
-