![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
java8
文章平均质量分 51
stream相关文档
伏加特遇上西柚
犹如烈焰般的伏特加和温柔酸甜的西柚碰撞在一起,将是一种美好的相遇。
展开
-
Optional使用详解
optional使用介绍原创 2023-07-05 09:07:02 · 164 阅读 · 0 评论 -
java8学习博客收藏
1、Java8–Optional使用范例原创 2022-03-11 09:30:13 · 293 阅读 · 0 评论 -
java8函数式编程
1、Java8 中 List 转 Map(Collectors.toMap) 使用技巧原创 2021-08-16 22:41:23 · 89 阅读 · 0 评论 -
Stream流中将集合转成map
public Map<Long, String> findBusinessUnitMapBySoids(List<Long> businessUnitSoids) { ListResult<List<BusinessUnitVo>> listBySoids = iBusinessUnitApi.findListBySoids(businessUnitSoids); Map<Long, String> res ...原创 2021-08-19 17:03:24 · 15847 阅读 · 1 评论 -
Optional使用技巧
案例一:如果是非集合,单纯的判断是否为空,不为空取值为空给个默认值或者初始化值 @Test void Test1(){ //有返回值的判空,如果是非集合,单纯的判断是否为空,不为空取值为空给个默认值或者初始化值 String referer =null; String s = Optional.ofNullable(referer).orElse(new String()); System.out.println("s =原创 2022-04-15 14:15:14 · 1690 阅读 · 0 评论 -
hutool工具-----CollStreamUtil
本篇博客来自hutoolJava8中Collectors详解介绍Java8中的新特性之一就是Stream,Hutool针对常用操作做了一些封装使用Student@Data@AllArgsConstructor@ToStringpublic class Student { private long termId;//学期id private long classId;//班级id private long studentId;//班级id private S原创 2022-03-10 17:13:50 · 3323 阅读 · 1 评论