Class Assert
java.lang.Object
com.baomidou.mybatisplus.core.toolkit.Assert
断言类
- Since:
- 2018-07-24
- Author:
- miemie
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void断言这个 map 为 emptystatic void断言这个 boolean 为 falsestatic void断言这个 object 为 nullstatic void断言这个 boolean 为 truestatic void断言这个 数组 不为 emptystatic void断言这个 value 不为 emptystatic voidnotEmpty(Collection<?> collection, String message, Object... params) 断言这个 collection 不为 emptystatic void断言这个 map 不为 emptystatic void断言这个 object 不为 null
-
Constructor Details
-
Assert
public Assert()
-
-
Method Details
-
isTrue
断言这个 boolean 为 true为 false 则抛出异常
- Parameters:
expression- boolean 值message- 消息
-
isFalse
断言这个 boolean 为 false为 true 则抛出异常
- Parameters:
expression- boolean 值message- 消息
-
isNull
断言这个 object 为 null不为 null 则抛异常
- Parameters:
object- 对象message- 消息
-
notNull
断言这个 object 不为 null为 null 则抛异常
- Parameters:
object- 对象message- 消息
-
notEmpty
断言这个 value 不为 empty为 empty 则抛异常
- Parameters:
value- 字符串message- 消息
-
notEmpty
断言这个 collection 不为 empty为 empty 则抛异常
- Parameters:
collection- 集合message- 消息
-
notEmpty
断言这个 map 不为 empty为 empty 则抛异常
- Parameters:
map- 集合message- 消息
-
isEmpty
断言这个 map 为 empty为 empty 则抛异常
- Parameters:
map- 集合message- 消息
-
notEmpty
断言这个 数组 不为 empty为 empty 则抛异常
- Parameters:
array- 数组message- 消息
-