public class Assert extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
notEmpty(String obj,
String msg)
Asserts that passed object instance is not null and not empty.
|
static void |
notNull(Object obj,
String msg)
Asserts that passed object instance is not null.
|
static void |
paramNotEmpty(String param,
String paramName)
Asserts that passed parameter is not null and not empty.
|
static void |
paramNotNull(Object param,
String paramName)
Asserts that passed parameter is not null.
|
public static void paramNotNull(Object param, String paramName)
IllegalArgumentException is thrown.param - the parameter to checkparamName - the parameter nameIllegalArgumentException - if param is nullpublic static void paramNotEmpty(String param, String paramName)
IllegalArgumentException is thrown.param - the parameter to checkparamName - the parameter nameIllegalArgumentException - if param is null or empty stringpublic static void notNull(Object obj, String msg)
IllegalArgumentException is thrown.obj - the object instance to checkmsg - the error message to useIllegalArgumentException - if obj is nullpublic static void notEmpty(String obj, String msg)
IllegalArgumentException is thrown.obj - the object instance to checkmsg - the error message to useIllegalArgumentException - if obj is null or empty stringCopyright © 2021. All rights reserved.