public final class Preconditions extends Object
Modifier and Type | Method and Description |
---|---|
static <T> List<T> |
assertNotEmpty(List<T> obj,
String name) |
static void |
assertNotEmpty(String str,
String name) |
static <T> T |
assertNotNull(T obj,
String name) |
static long |
assertNotZero(long n,
String name) |
static long |
assertPositive(long n,
String name) |
static <T> void |
assertThat(T obj,
String msg,
Fn.Predicate<T> predicate) |
static long |
assertZero(long n,
String name) |
@NonNull public static <T> T assertNotNull(@Nullable T obj, @NonNull String name)
public static long assertPositive(long n, @NonNull String name)
public static long assertNotZero(long n, @NonNull String name)
public static long assertZero(long n, @NonNull String name)
@NonNull public static <T> List<T> assertNotEmpty(@Nullable List<T> obj, @NonNull String name)
public static <T> void assertThat(T obj, @NonNull String msg, @NonNull Fn.Predicate<T> predicate)