类 Assert
java.lang.Object
com.baomidou.mybatisplus.core.toolkit.Assert
public final class Assert extends Object
断言类
- 从以下版本开始:
- 2018-07-24
- 作者:
- miemie
-
构造器概要
构造器 构造器 说明 Assert()
-
方法概要
修饰符和类型 方法 说明 static void
isFalse(boolean expression, String message, Object... params)
断言这个 boolean 为 falsestatic void
isNull(Object object, String message, Object... params)
断言这个 object 为 nullstatic void
isTrue(boolean expression, String message, Object... params)
断言这个 boolean 为 truestatic void
notEmpty(Object[] array, String message, Object... params)
断言这个 数组 不为 emptystatic void
notEmpty(String value, String message, Object... params)
断言这个 value 不为 emptystatic void
notEmpty(Collection<?> collection, String message, Object... params)
断言这个 collection 不为 emptystatic void
notEmpty(Map<?,?> map, String message, Object... params)
断言这个 map 不为 emptystatic void
notNull(Object object, String message, Object... params)
断言这个 object 不为 null
-
构造器详细资料
-
Assert
public Assert()
-
-
方法详细资料
-
isTrue
断言这个 boolean 为 true为 false 则抛出异常
- 参数:
expression
- boolean 值message
- 消息
-
isFalse
断言这个 boolean 为 false为 true 则抛出异常
- 参数:
expression
- boolean 值message
- 消息
-
isNull
断言这个 object 为 null不为 null 则抛异常
- 参数:
object
- 对象message
- 消息
-
notNull
断言这个 object 不为 null为 null 则抛异常
- 参数:
object
- 对象message
- 消息
-
notEmpty
断言这个 value 不为 empty为 empty 则抛异常
- 参数:
value
- 字符串message
- 消息
-
notEmpty
断言这个 collection 不为 empty为 empty 则抛异常
- 参数:
collection
- 集合message
- 消息
-
notEmpty
断言这个 map 不为 empty为 empty 则抛异常
- 参数:
map
- 集合message
- 消息
-
notEmpty
断言这个 数组 不为 empty为 empty 则抛异常
- 参数:
array
- 数组message
- 消息
-