public final class Check
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
assertTrue(boolean condition)
Check and ensure that a specific condition is met.
|
static void |
assertTrue(boolean condition,
java.lang.String message)
Check and ensure that a specific condition is met.
|
static <T> T |
fail()
Throw an IllegalStateException to indicate that an unexpected execution state occurred.
|
static <T> T |
fail(java.lang.String message)
Throw an IllegalStateException to indicate that an unexpected execution state occurred.
|
static <T> T |
notNull(T object)
Check and ensure that an Object is not
null. |
static <T> T |
notNull(T object,
java.lang.String message)
Check and ensure that an Object is not
null. |
public static <T> T notNull(@Nullable T object)
null.T - The actual object type.object - The Object to check.null).java.lang.NullPointerException - if the submitted argument is null.public static <T> T notNull(@Nullable T object, java.lang.String message)
null.T - The actual object type.object - The Object to check.message - The message to issue if the check fails.null).java.lang.NullPointerException - if the submitted argument is null.public static void assertTrue(boolean condition)
condition - The condition to check.java.lang.IllegalStateException - if the condition is not met.public static void assertTrue(boolean condition,
java.lang.String message)
condition - The condition to check.message - The message to issue if the check fails.java.lang.IllegalStateException - if the condition is not met.public static <T> T fail()
T - The generic return type.java.lang.IllegalStateException - any time this function is called.public static <T> T fail(java.lang.String message)
T - The generic return type.message - The message to issue if the check fails.java.lang.IllegalStateException - any time this function is called.