public final class Assertions
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
blankCheck(java.lang.String o,
java.lang.String param)
Throws
IllegalArgumentException if the parameter o
is null or blank. |
static java.lang.String |
blankChecked(java.lang.String o,
java.lang.String param)
Throws
IllegalArgumentException if the parameter o
is null or blank, otherwise returns the value of the
o parameter. |
static void |
nullCheck(java.lang.Object o,
java.lang.String param)
Throws
NullPointerException if the parameter o is
null. |
static <T> T |
nullChecked(T o,
java.lang.String param)
Throws
NullPointerException if the parameter o is
null, otherwise returns the value of the o parameter. |
public static void nullCheck(java.lang.Object o,
java.lang.String param)
NullPointerException if the parameter o is
null.o - check if the object is null.param - name of the parameter to check for null.java.lang.NullPointerException - if o is null and constructs a
message with the name of the parameter.public static <T> T nullChecked(T o,
java.lang.String param)
NullPointerException if the parameter o is
null, otherwise returns the value of the o parameter.o - check if the object is null.param - name of the parameter to check for null.o parameter.java.lang.NullPointerException - if o is null and constructs a
message with the name of the parameter.public static void blankCheck(java.lang.String o,
java.lang.String param)
IllegalArgumentException if the parameter o
is null or blank.o - value to test for blank.param - name of the parameter to check.public static java.lang.String blankChecked(java.lang.String o,
java.lang.String param)
IllegalArgumentException if the parameter o
is null or blank, otherwise returns the value of the
o parameter.o - value to test for blank.param - name of the parameter to check.o parameter.