public class Preconditions extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static <T> T |
checkNotEmpty(T obj) |
static <T> T |
checkNotEmpty(T obj,
String errorMessage) |
static <T> T |
checkNotNull(T obj) |
static <T> T |
checkNotNull(T obj,
String errorMessage) |
static <T> T |
checkNotNull(T obj,
Supplier0<String> errorMessageSupplier0) |
static void |
checkTrue(boolean expression) |
static void |
checkTrue(boolean expression,
String errorMessage) |
static <T> T |
test(Predicate<T> predicate,
T argument) |
static <T> T |
test(Predicate<T> predicate,
T argument,
String message) |
public static <T> T test(@NonNull Predicate<T> predicate, @Nullable T argument, String message)
public static <T> T checkNotNull(@NonNull T obj)
public static <T> T checkNotNull(@NonNull T obj, @Nullable Supplier0<String> errorMessageSupplier0)
public static <T> T checkNotEmpty(@Nullable T obj)
public static void checkTrue(boolean expression)
public static void checkTrue(boolean expression,
String errorMessage)
Copyright © 2019. All rights reserved.