public class Assert
extends java.lang.Object
Constructor and Description |
---|
Assert() |
Modifier and Type | Method and Description |
---|---|
static void |
assertFalse(boolean condition) |
static void |
assertFalse(boolean condition,
java.util.function.Supplier<java.lang.String> msg) |
static <T> T |
assertNeverCalled() |
static <T> java.util.Collection<T> |
assertNotEmpty(java.util.Collection<T> collection) |
static <T> java.util.Collection<T> |
assertNotEmpty(java.util.Collection<T> collection,
java.util.function.Supplier<java.lang.String> msg) |
static <T> T |
assertNotNull(T object) |
static <T> T |
assertNotNull(T object,
java.util.function.Supplier<java.lang.String> msg) |
static <T> T |
assertNotNullWithNPE(T object,
java.util.function.Supplier<java.lang.String> msg) |
static <T> void |
assertNull(T object) |
static <T> void |
assertNull(T object,
java.util.function.Supplier<java.lang.String> msg) |
static <T> T |
assertShouldNeverHappen() |
static <T> T |
assertShouldNeverHappen(java.lang.String format,
java.lang.Object... args) |
static void |
assertTrue(boolean condition) |
static void |
assertTrue(boolean condition,
java.util.function.Supplier<java.lang.String> msg) |
static java.lang.String |
assertValidName(java.lang.String name)
Validates that the Lexical token name matches the current spec.
|
public static <T> T assertNotNull(T object, java.util.function.Supplier<java.lang.String> msg)
public static <T> T assertNotNullWithNPE(T object, java.util.function.Supplier<java.lang.String> msg)
public static <T> T assertNotNull(T object)
public static <T> void assertNull(T object, java.util.function.Supplier<java.lang.String> msg)
public static <T> void assertNull(T object)
public static <T> T assertNeverCalled()
public static <T> T assertShouldNeverHappen(java.lang.String format, java.lang.Object... args)
public static <T> T assertShouldNeverHappen()
public static <T> java.util.Collection<T> assertNotEmpty(java.util.Collection<T> collection)
public static <T> java.util.Collection<T> assertNotEmpty(java.util.Collection<T> collection, java.util.function.Supplier<java.lang.String> msg)
public static void assertTrue(boolean condition, java.util.function.Supplier<java.lang.String> msg)
public static void assertTrue(boolean condition)
public static void assertFalse(boolean condition, java.util.function.Supplier<java.lang.String> msg)
public static void assertFalse(boolean condition)
public static java.lang.String assertValidName(java.lang.String name)
name
- - the name to be validated.