public abstract class Valid extends Object
可以被拓展
所抛出的异常必须为 InvalidArgumentException
或其子类
Constructor and Description |
---|
Valid() |
Modifier and Type | Method and Description |
---|---|
static <T extends Comparable<T>> |
compare(T t1,
T t2) |
static <T> void |
compare(T t1,
T t2,
Comparator<T> comparator) |
static <T> void |
compare(T t1,
T t2,
Comparator<T> comparator,
String message,
Object... values) |
static <T extends Comparable<T>> |
compare(T t1,
T t2,
String message,
Object... values) |
static void |
eq(Object o1,
Object o2) |
static void |
eq(Object o1,
Object o2,
String message,
Object... values) |
static <T extends Comparable<T>> |
gt(T value,
T refer) |
static <T extends Comparable<T>> |
gt(T value,
T refer,
String message,
Object... values) |
static <T extends Comparable<T>> |
gte(T value,
T refer) |
static <T extends Comparable<T>> |
gte(T value,
T refer,
String message,
Object... values) |
static <T> T |
in(T t,
Collection<? extends T> c) |
static <T> T |
in(T t,
Collection<? extends T> c,
String message,
Object... values) |
static <T> T |
in(T t,
T... arr) |
static <T> T |
in(T t,
T[] arr,
String message,
Object... values) |
static <T extends Comparable<T>> |
inRange(T value,
T start,
T end) |
static <T extends Comparable<T>> |
inRange(T value,
T start,
T end,
String message,
Object... values) |
static String |
isDouble(String s) |
static String |
isDouble(String s,
String message,
Object... values) |
static boolean |
isFalse(boolean expression) |
static boolean |
isFalse(boolean expression,
String message,
Object... values) |
static boolean |
isFalse(BooleanSupplier s) |
static boolean |
isFalse(BooleanSupplier s,
String message,
Object... values) |
static <T> T |
isInstanceOf(Object obj,
Class<T> type) |
static <T> T |
isInstanceOf(Object obj,
Class<T> type,
String message,
Object... values) |
static String |
isInteger(String s) |
static String |
isInteger(String s,
String message,
Object... values) |
static String |
isMatches(String input,
String pattern) |
static String |
isMatches(String input,
String pattern,
String message,
Object... values) |
static <T> T |
isNull(T object) |
static <T> T |
isNull(T object,
String message,
Object... values) |
static String |
isNumber(String s) |
static String |
isNumber(String s,
String message,
Object... values) |
static boolean |
isTrue(boolean expression) |
static boolean |
isTrue(boolean expression,
String message,
Object... values) |
static boolean |
isTrue(BooleanSupplier s) |
static boolean |
isTrue(BooleanSupplier s,
String message,
Object... values) |
static <T extends Comparable<T>> |
lt(T value,
T refer) |
static <T extends Comparable<T>> |
lt(T value,
T refer,
String message,
Object... values) |
static <T extends Comparable<T>> |
lte(T value,
T refer) |
static <T extends Comparable<T>> |
lte(T value,
T refer,
String message,
Object... values) |
static void |
neq(Object o1,
Object o2) |
static void |
neq(Object o1,
Object o2,
String message,
Object... values) |
static <T extends Iterable<?>> |
noNullElements(T iterable) |
static <T> T[] |
noNullElements(T[] array) |
static <T> T[] |
noNullElements(T[] array,
String message,
Object... values) |
static <T extends Iterable<?>> |
noNullElements(T iterable,
String message,
Object... values) |
static String |
notBlank(String s) |
static String |
notBlank(String s,
String message,
Object... values) |
static <T extends Comparable<T>> |
notCompare(T t1,
T t2) |
static <T> void |
notCompare(T t1,
T t2,
Comparator<T> comparator) |
static <T> void |
notCompare(T t1,
T t2,
Comparator<T> comparator,
String message,
Object... values) |
static <T extends Comparable<T>> |
notCompare(T t1,
T t2,
String message,
Object... values) |
static String |
notEmpty(String s) |
static String |
notEmpty(String s,
String message,
Object... values) |
static <T extends Collection<?>> |
notEmpty(T collection) |
static <T extends Map<?,?>> |
notEmpty(T map) |
static <T> T[] |
notEmpty(T[] array) |
static <T> T[] |
notEmpty(T[] array,
String message,
Object... values) |
static <T extends Collection<?>> |
notEmpty(T collection,
String message,
Object... values) |
static <T extends Map<?,?>> |
notEmpty(T map,
String message,
Object... values) |
static <T> T |
notIn(T t,
Collection<? extends T> c) |
static <T> T |
notIn(T t,
Collection<? extends T> c,
String message,
Object... values) |
static <T> T |
notIn(T t,
T... arr) |
static <T> T |
notIn(T t,
T[] arr,
String message,
Object... values) |
static <T extends Comparable<T>> |
notInRange(T value,
T start,
T end) |
static <T extends Comparable<T>> |
notInRange(T value,
T start,
T end,
String message,
Object... values) |
static String |
notMatches(String input,
String pattern) |
static String |
notMatches(String input,
String pattern,
String message,
Object... values) |
static double |
notNaN(double value) |
static double |
notNaN(double value,
String message,
Object... values) |
static double |
notNaN(float value) |
static double |
notNaN(float value,
String message,
Object... values) |
static <T> T |
notNull(T object) |
static <T> T |
notNull(T object,
String message,
Object... values) |
static BigDecimal |
notZero(BigDecimal value) |
static BigDecimal |
notZero(BigDecimal value,
String message,
Object... values) |
static BigInteger |
notZero(BigInteger value) |
static BigInteger |
notZero(BigInteger value,
String message,
Object... values) |
static double |
notZero(double value) |
static double |
notZero(double value,
String message,
Object... values) |
static int |
notZero(int value) |
static int |
notZero(int value,
String message,
Object... values) |
static long |
notZero(long value) |
static long |
notZero(long value,
String message,
Object... values) |
static <T extends IHttpResponse> |
validHttpOk(T resp) |
static <T> T |
validIndex(T[] array,
int index) |
static <T> T |
validIndex(T[] array,
int index,
String message,
Object... values) |
static <T extends Collection<?>> |
validIndex(T collection,
int index) |
static <T extends Collection<?>> |
validIndex(T collection,
int index,
String message,
Object... values) |
static String |
validLength(String s,
int length) |
static String |
validLength(String s,
int length,
String message,
Object... values) |
static String |
validLengthGt(String s,
int length) |
static String |
validLengthGt(String s,
int length,
String message,
Object... values) |
static String |
validLengthGte(String s,
int length) |
static String |
validLengthGte(String s,
int length,
String message,
Object... values) |
static String |
validLengthIn(String s,
int start,
int end) |
static String |
validLengthIn(String s,
int start,
int end,
String message,
Object... values) |
static String |
validLengthLt(String s,
int length) |
static String |
validLengthLt(String s,
int length,
String message,
Object... values) |
static String |
validLengthLte(String s,
int length) |
static String |
validLengthLte(String s,
int length,
String message,
Object... values) |
static <T> T |
validWrapper(HttpWrapper<T> wrapper) |
static <T> T |
validWrapper(RpcWrapper<T> wrapper) |
public static <T extends Comparable<T>> void compare(T t1, T t2)
public static <T extends Comparable<T>> void compare(T t1, T t2, String message, Object... values)
public static <T extends Comparable<T>> void notCompare(T t1, T t2)
public static <T extends Comparable<T>> void notCompare(T t1, T t2, String message, Object... values)
public static <T> void compare(T t1, T t2, Comparator<T> comparator)
public static <T> void compare(T t1, T t2, Comparator<T> comparator, String message, Object... values)
public static <T> void notCompare(T t1, T t2, Comparator<T> comparator)
public static <T> void notCompare(T t1, T t2, Comparator<T> comparator, String message, Object... values)
public static <T extends Comparable<T>> T lt(T value, T refer)
public static <T extends Comparable<T>> T lt(T value, T refer, String message, Object... values)
public static <T extends Comparable<T>> T lte(T value, T refer)
public static <T extends Comparable<T>> T lte(T value, T refer, String message, Object... values)
public static <T extends Comparable<T>> T gt(T value, T refer)
public static <T extends Comparable<T>> T gt(T value, T refer, String message, Object... values)
public static <T extends Comparable<T>> T gte(T value, T refer)
public static <T extends Comparable<T>> T gte(T value, T refer, String message, Object... values)
public static boolean isTrue(BooleanSupplier s)
public static boolean isTrue(BooleanSupplier s, String message, Object... values)
public static boolean isTrue(boolean expression)
public static boolean isFalse(BooleanSupplier s)
public static boolean isFalse(BooleanSupplier s, String message, Object... values)
public static boolean isFalse(boolean expression)
public static <T> T isNull(T object)
public static <T> T notNull(T object)
@SafeVarargs public static <T> T in(T t, T... arr)
public static <T> T in(T t, Collection<? extends T> c)
public static <T> T in(T t, Collection<? extends T> c, String message, Object... values)
@SafeVarargs public static <T> T notIn(T t, T... arr)
public static <T> T notIn(T t, Collection<? extends T> c)
public static <T> T notIn(T t, Collection<? extends T> c, String message, Object... values)
public static <T> T[] notEmpty(T[] array)
public static <T extends Collection<?>> T notEmpty(T collection)
public static <T extends Collection<?>> T notEmpty(T collection, String message, Object... values)
public static <T extends Map<?,?>> T notEmpty(T map)
public static <T> T validIndex(T[] array, int index)
public static <T extends Collection<?>> void validIndex(T collection, int index)
public static <T extends Collection<?>> void validIndex(T collection, int index, String message, Object... values)
public static <T> T[] noNullElements(T[] array)
public static <T extends Iterable<?>> T noNullElements(T iterable)
public static <T extends Iterable<?>> T noNullElements(T iterable, String message, Object... values)
public static String isMatches(String input, String pattern, String message, Object... values)
public static String notMatches(String input, String pattern, String message, Object... values)
public static int notZero(int value)
public static long notZero(long value)
public static double notZero(double value)
public static BigDecimal notZero(BigDecimal value)
public static BigDecimal notZero(BigDecimal value, String message, Object... values)
public static BigInteger notZero(BigInteger value)
public static BigInteger notZero(BigInteger value, String message, Object... values)
public static double notNaN(float value)
public static double notNaN(double value)
public static <T extends Comparable<T>> T inRange(T value, T start, T end)
public static <T extends Comparable<T>> T inRange(T value, T start, T end, String message, Object... values)
public static <T extends Comparable<T>> T notInRange(T value, T start, T end)
public static <T extends Comparable<T>> T notInRange(T value, T start, T end, String message, Object... values)
public static String validLength(String s, int length, String message, Object... values)
public static String validLengthIn(String s, int start, int end, String message, Object... values)
public static String validLengthGt(String s, int length, String message, Object... values)
public static String validLengthGte(String s, int length, String message, Object... values)
public static String validLengthLt(String s, int length, String message, Object... values)
public static String validLengthLte(String s, int length, String message, Object... values)
public static <T> T isInstanceOf(Object obj, Class<T> type, String message, Object... values)
public static <T> T validWrapper(HttpWrapper<T> wrapper)
public static <T> T validWrapper(RpcWrapper<T> wrapper)
public static <T extends IHttpResponse> T validHttpOk(T resp)
Copyright © 2024. All rights reserved.