public final class AssertIllegalArgument
extends java.lang.Object
断言工具类,对于满足断言的情况,抛出IllegalArgumentException异常. 一般用于检查传入参数是否合法
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
isDirectory(java.io.File file,
java.lang.String arguDescp)
Checks if is directory.
|
static void |
isExists(java.io.File file,
java.lang.String arguDescp)
Checks if is exists.
|
static void |
isFile(java.io.File file,
java.lang.String arguDescp)
Checks if is file.
|
static <N extends java.lang.Number> |
isGe(N value,
N min,
java.lang.String arguDescp)
Checks if is ge.
|
static <N extends java.lang.Number> |
isGe(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N min)
Checks if is ge.
|
static <N extends java.lang.Number> |
isGt(N value,
N min,
java.lang.String arguDescp)
Checks if is gt.
|
static <N extends java.lang.Number> |
isGt(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N min)
Checks if is gt.
|
static <N extends java.lang.Number> |
isInRange(N value,
N min,
N max,
java.lang.String arguDescp)
Checks if is in range.
|
static <N extends java.lang.Number> |
isInRange(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N min,
N max)
Checks if is in range.
|
static void |
isInstanceOf(java.lang.Class<?> clazz,
java.lang.Object obj)
Checks if is instance of.
|
static <N extends java.lang.Number> |
isLe(N value,
N max,
java.lang.String arguDescp)
Checks if is le.
|
<N extends java.lang.Number> |
isLe(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N max)
Checks if is le.
|
static <N extends java.lang.Number> |
isLt(N value,
N max,
java.lang.String arguDescp)
Checks if is lt.
|
static <N extends java.lang.Number> |
isLt(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N max)
Checks if is lt.
|
static void |
isNotBlank(cn.featherfly.common.lang.function.SerializableSupplier<java.lang.String> propertySupplier)
Checks if is not blank.
|
static void |
isNotBlank(java.lang.String text,
java.lang.String arguDescp)
Checks if is not blank.
|
static void |
isNotEmpty(java.util.Collection<?> collection,
java.lang.String arguDescp)
Checks if is not empty.
|
static void |
isNotEmpty(java.util.Map<?,?> map,
java.lang.String arguDescp)
Checks if is not empty.
|
static void |
isNotEmpty(java.lang.Object[] array,
java.lang.String arguDescp)
Checks if is not empty.
|
static void |
isNotEmpty(java.lang.Object obj,
java.lang.String arguDescp)
Checks if is not empty.
|
static <T> void |
isNotEmpty(cn.featherfly.common.lang.function.SerializableSupplier<T> propertySupplier)
Checks if is not empty.
|
static void |
isNotEmpty(java.lang.String text,
java.lang.String arguDescp)
Checks if is not empty.
|
static void |
isNotInterface(java.lang.Class<?> classType)
Checks if is not interface.
|
static void |
isNotNull(java.lang.Object object,
java.lang.String arguDescp)
Checks if is not null.
|
static <T> void |
isNotNull(cn.featherfly.common.lang.function.SerializableSupplier<T> propertySupplier)
Checks if is not null.
|
static void |
isParent(java.lang.Class<?> parentType,
java.lang.Class<?> subType)
Checks if is parent.
|
public static void isNotNull(java.lang.Object object,
java.lang.String arguDescp)
object - objectarguDescp - argument descptionLocalizedAssert.isNotNull(java.lang.Object,
java.lang.String)public static void isNotBlank(java.lang.String text,
java.lang.String arguDescp)
text - textarguDescp - argument descptionLocalizedAssert.isNotBlank(java.lang.String,
java.lang.String)public static void isNotEmpty(java.lang.Object obj,
java.lang.String arguDescp)
obj - objarguDescp - arguDescpLocalizedAssert.isNotEmpty(java.lang.Object,
java.lang.String)public static void isNotEmpty(java.lang.String text,
java.lang.String arguDescp)
text - textarguDescp - argument descptionLocalizedAssert.isNotEmpty(java.lang.String,
java.lang.String)public static void isNotEmpty(java.lang.Object[] array,
java.lang.String arguDescp)
array - arrayarguDescp - arguDescpLocalizedAssert.isNotEmpty(java.lang.Object[],
java.lang.String)public static void isNotEmpty(java.util.Collection<?> collection,
java.lang.String arguDescp)
collection - collectionarguDescp - arguDescpLocalizedAssert.isNotEmpty(java.util.Collection,
java.lang.String)public static void isNotEmpty(java.util.Map<?,?> map,
java.lang.String arguDescp)
map - maparguDescp - arguDescpLocalizedAssert.isNotEmpty(java.util.Map,
java.lang.String)public static void isExists(java.io.File file,
java.lang.String arguDescp)
file - filearguDescp - argument descptionLocalizedAssert.isExists(java.io.File,
java.lang.String)public static void isInstanceOf(java.lang.Class<?> clazz,
java.lang.Object obj)
clazz - clazzobj - objLocalizedAssert.isInstanceOf(java.lang.Class,
java.lang.Object)public static void isParent(java.lang.Class<?> parentType,
java.lang.Class<?> subType)
parentType - parentTypesubType - subTypeLocalizedAssert.isParent(java.lang.Class,
java.lang.Class)public static void isFile(java.io.File file,
java.lang.String arguDescp)
file - the filearguDescp - the argu descpLocalizedAssert.isFile(java.io.File,
java.lang.String)public static void isDirectory(java.io.File file,
java.lang.String arguDescp)
file - the filearguDescp - the argu descpLocalizedAssert.isDirectory(java.io.File,
java.lang.String)public static void isNotInterface(java.lang.Class<?> classType)
classType - the class typeLocalizedAssert.isNotInterface(java.lang.Class)public static <N extends java.lang.Number> void isInRange(N value,
N min,
N max,
java.lang.String arguDescp)
N - the number typevalue - the valuemin - the minmax - the maxarguDescp - the argu descpLocalizedAssert.isInRange(java.lang.Number,
java.lang.Number, java.lang.Number, java.lang.String)public static <N extends java.lang.Number> void isInRange(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N min,
N max)
N - the number typevalue - the valuemin - the minmax - the maxLocalizedAssert.isInRange(cn.featherfly.common.lang.function.NumberSupplier,
java.lang.Number, java.lang.Number)public static <N extends java.lang.Number> void isGt(N value,
N min,
java.lang.String arguDescp)
N - the number typevalue - the valuemin - the minarguDescp - the argu descpLocalizedAssert.isGt(java.lang.Number,
java.lang.Number, java.lang.String)public static <N extends java.lang.Number> void isGt(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N min)
N - the number typevalue - the valuemin - the minLocalizedAssert.isGt(cn.featherfly.common.lang.function.NumberSupplier,
java.lang.Number)public static <N extends java.lang.Number> void isGe(N value,
N min,
java.lang.String arguDescp)
N - the number typevalue - the valuemin - the minarguDescp - the argu descpLocalizedAssert.isGe(java.lang.Number,
java.lang.Number, java.lang.String)public static <N extends java.lang.Number> void isGe(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N min)
N - the number typevalue - the valuemin - the minLocalizedAssert.isGe(cn.featherfly.common.lang.function.NumberSupplier,
java.lang.Number)public static <N extends java.lang.Number> void isLt(N value,
N max,
java.lang.String arguDescp)
N - the number typevalue - the valuemax - the maxarguDescp - the argu descpLocalizedAssert.isLt(java.lang.Number,
java.lang.Number, java.lang.String)public static <N extends java.lang.Number> void isLt(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N max)
N - the number typevalue - the valuemax - the maxLocalizedAssert.isLt(cn.featherfly.common.lang.function.NumberSupplier,
java.lang.Number)public static <N extends java.lang.Number> void isLe(N value,
N max,
java.lang.String arguDescp)
N - the number typevalue - the valuemax - the maxarguDescp - the argu descpLocalizedAssert.isLe(java.lang.Number,
java.lang.Number, java.lang.String)public <N extends java.lang.Number> void isLe(cn.featherfly.common.lang.function.NumberSupplier<N> value,
N max)
N - the number typevalue - the valuemax - the maxLocalizedAssert.isLe(cn.featherfly.common.lang.function.NumberSupplier,
java.lang.Number)public static <T> void isNotNull(cn.featherfly.common.lang.function.SerializableSupplier<T> propertySupplier)
T - the generic typepropertySupplier - the property supplierLocalizedAssert.isNotNull(cn.featherfly.common.lang.function.SerializableSupplier)public static void isNotBlank(cn.featherfly.common.lang.function.SerializableSupplier<java.lang.String> propertySupplier)
propertySupplier - the property supplierLocalizedAssert.isNotBlank(cn.featherfly.common.lang.function.SerializableSupplier)public static <T> void isNotEmpty(cn.featherfly.common.lang.function.SerializableSupplier<T> propertySupplier)
T - the generic typepropertySupplier - the property supplierLocalizedAssert.isNotEmpty(cn.featherfly.common.lang.function.SerializableSupplier)