程序包 cn.godmao.utils
类 ObjectUtil
java.lang.Object
cn.godmao.utils.DateUtil
cn.godmao.utils.MathUtil
cn.godmao.utils.RandomUtil
cn.godmao.utils.ObjectUtil
- 直接已知子类:
SimpleHelper
对象工具类
-
字段概要
从类继承的字段 cn.godmao.utils.RandomUtil
chineseWord, foodName, surName, surNick从类继承的字段 cn.godmao.utils.DateUtil
DATE_PATTERN1, DATE_PATTERN10, DATE_PATTERN11, DATE_PATTERN2, DATE_PATTERN3, DATE_PATTERN4, DATE_PATTERN5, DATE_PATTERN6, DATE_PATTERN7, DATE_PATTERN8, DATE_PATTERN9 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static <T> TcheckNotNull(T arg, String text) static <T> TdefaultValue(Class<T> type) static voiddoesNotContain(String textToSearch, String substring) static voiddoesNotContain(String textToSearch, String substring, String message) static booleanhasLength(CharSequence str) static booleanstatic voidstatic booleanhasText(CharSequence str) static booleanstatic voidstatic voidisAssignable(Class superType, Class subType) static voidisAssignable(Class superType, Class subType, String message) booleanisBaseType(Class<?> beanClass) 验证该对象是否基础类型booleanisBaseType(Object value) 验证该对象是否基础类型static boolean对象空判断static voidisInstanceOf(Class clazz, Object obj) static voidisInstanceOf(Class type, Object obj, String message) static booleanisNotEmpty(Object obj) 对象非空判断static boolean判断object是否不为空,集合会校验sizestatic voidstatic boolean判断object是否为空,集合会校验sizestatic voidstatic Boolean判断String是否能转intstatic voidisTrue(boolean expression) static voidstatic voidnoNullElements(Object[] array) static voidnoNullElements(Object[] array, String message) static voidstatic voidstatic voidstatic voidnotEmpty(Collection collection) static voidnotEmpty(Collection collection, String message) static voidstatic voidstatic voidstatic voidstatic voidstate(boolean expression) static void从类继承的方法 cn.godmao.utils.RandomUtil
main, randomImg, randomName从类继承的方法 cn.godmao.utils.DateUtil
addDateDays, addDateHours, addDateMinutes, addDateMonths, addDateSeconds, addDateWeeks, addDateYears, completionDate, dateDelta, designatedDate, formartLocalDate, format, formatLocalDateTime, fromMillSeconds, fromSeconds, getMillSeconds, getPatterns, getSeconds, isToday, lastMonday, lastYear, monday, parseDate, toDate, toDate, toDate, today, toLocalDate, toLocalDate, toLocalDate, toLocalDateTime, toLocalDateTime, toLocalDateTime, toLocalDateTime, tomorrow, toZonedDateTime, weekEnd, weekStart, year, yesterday
-
构造器详细资料
-
ObjectUtil
public ObjectUtil()
-
-
方法详细资料
-
isNull
判断object是否为空,集合会校验size -
isNotNull
判断object是否不为空,集合会校验size -
isNotEmpty
对象非空判断 -
isEmpty
对象空判断 -
defaultValue
-
checkNotNull
-
isTrue
-
isTrue
public static void isTrue(boolean expression) -
isNull
-
isNull
-
notNull
-
notNull
-
hasLength
-
hasLength
-
hasLength
-
hasText
-
hasText
-
hasText
-
doesNotContain
-
doesNotContain
-
notEmpty
-
notEmpty
-
notEmpty
-
noNullElements
-
noNullElements
-
notEmpty
-
notEmpty
-
notEmpty
-
notEmpty
-
isInstanceOf
-
isInstanceOf
-
isAssignable
-
isAssignable
-
state
-
state
public static void state(boolean expression) -
isBaseType
验证该对象是否基础类型 -
isBaseType
验证该对象是否基础类型 -
isNumeric
判断String是否能转int
-