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