Class Preconditions
- java.lang.Object
-
- com.couchbase.lite.internal.utils.Preconditions
-
public final class Preconditions extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
assertNegative(int n, String name)
static long
assertNegative(long n, String name)
static String
assertNotEmpty(String str, String name)
static <K extends Collection<T>,T>
KassertNotEmpty(K obj, 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)
-
-
-
Method Detail
-
assertPositive
public static long assertPositive(long n, @NonNull String name)
-
assertPositive
public static int assertPositive(int n, @NonNull String name)
-
assertNegative
public static long assertNegative(long n, @NonNull String name)
-
assertNegative
public static int assertNegative(int n, @NonNull String name)
-
assertNotNegative
public static long assertNotNegative(long n, @NonNull String name)
-
assertNotNegative
public static int assertNotNegative(int n, @NonNull String name)
-
assertZero
public static long assertZero(long n, @NonNull String name)
-
assertZero
public static int assertZero(int n, @NonNull String name)
-
assertNotZero
public static long assertNotZero(long n, @NonNull String name)
-
assertNotZero
public static int assertNotZero(int n, @NonNull String name)
-
assertNotNull
@NonNull public static <T> T assertNotNull(@Nullable T obj, @NonNull String name)
-
assertNotEmpty
@NonNull public static String assertNotEmpty(@Nullable String str, @NonNull String name)
-
assertNotEmpty
@NonNull public static <K extends Collection<T>,T> K assertNotEmpty(@Nullable K obj, @NonNull String name)
-
assertThat
@Nullable public static <T> T assertThat(@Nullable T obj, @NonNull String msg, @NonNull Fn.Predicate<T> predicate)
-
-