08 2020 档案

摘要:BeanUtils.copyProperties(A,B); 是A中的值付给B 阅读全文
posted @ 2020-08-15 20:05 Pseudo-lover 阅读(101) 评论(0) 推荐(0)
摘要:集合取差集: List<Integer> reduce2 = list1.stream().filter(item -> !list.contains(item)).collect(toList()); 阅读全文
posted @ 2020-08-14 22:49 Pseudo-lover 阅读(198) 评论(0) 推荐(0)
摘要:apache的commons-lang3的StringUtils: isBlank(CharSequence cs) 检查字符串是否为null、empty或空格字符,返回一个boolean isEmpty(CharSequence cs) 检查字符串是否为null、empty,返回一个boolean 阅读全文
posted @ 2020-08-14 21:38 Pseudo-lover 阅读(148) 评论(0) 推荐(0)
摘要:取当前时间(jdk1.8)用法 //获取当前日期(年月日时分秒) LocalDateTime date =LocalDateTime.now(); //当前时间的时间戳 Timestamp timestamp= Timestamp.valueOf(LocalDateTime.now()); // 获 阅读全文
posted @ 2020-08-14 20:20 Pseudo-lover 阅读(1486) 评论(0) 推荐(0)
摘要:1.当前时间转换为时间戳:new data().getTime(); 2.取String类型特定的时间转换时间戳: SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date f=format.parse(传 阅读全文
posted @ 2020-08-14 19:51 Pseudo-lover 阅读(202) 评论(0) 推荐(0)
摘要:向上取整:Math.ceil(); 只要有小数就向上取整数 向下取整:Math.floor();有小数就向下取整数 取整数int类型:Math.round(); 阅读全文
posted @ 2020-08-14 19:39 Pseudo-lover 阅读(291) 评论(0) 推荐(0)