类 Assert
- java.lang.Object
-
- tk.mybatis.mapper.util.Assert
-
public abstract class Assert extends Object
- 作者:
- liuzh
-
-
构造器概要
构造器 构造器 说明 Assert()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static voidisNull(Object object, String errorMsg)static voidisTrue(boolean expression, String errorMsg)static Object[]notEmpty(Object[] array, String errorMsg)static StringnotEmpty(String text, String errorMsg)static <T> Collection<T>notEmpty(Collection<T> collection, String errorMsg)static <K,V>
Map<K,V>notEmpty(Map<K,V> map, String errorMsg)static <T> TnotNull(T object, String errorMsg)
-
-
-
方法详细资料
-
isTrue
public static void isTrue(boolean expression, String errorMsg) throws IllegalArgumentException
-
isNull
public static void isNull(Object object, String errorMsg) throws IllegalArgumentException
-
notNull
public static <T> T notNull(T object, String errorMsg) throws NullPointerException
-
notEmpty
public static String notEmpty(String text, String errorMsg) throws IllegalArgumentException
-
notEmpty
public static Object[] notEmpty(Object[] array, String errorMsg) throws IllegalArgumentException
-
notEmpty
public static <T> Collection<T> notEmpty(Collection<T> collection, String errorMsg) throws IllegalArgumentException
-
notEmpty
public static <K,V> Map<K,V> notEmpty(Map<K,V> map, String errorMsg) throws IllegalArgumentException
-
-