![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
stream
渣渣港
这个作者很懒,什么都没留下…
展开
-
Java+8实战阅读相关笔记
andThen和compose区别 // 先定义两个函数 这里的函数泛型1是入参类型也就是x的类型泛型2就是返回值的类型 Function<Integer,Integer> a = x -> x+1; Function<Integer,Integer> b = x -> x*2; Function<Integer,Integer> c = a.andThen(b); Function<Integer,Integer> d = a.compose(b原创 2021-10-12 11:53:59 · 68 阅读 · 0 评论 -
list.remove删除根据对象地址值还是对象属性值
话不多说直接上代码 /*没有重写equals的对象Test 注意:lombok的@Data也是重写了equals*/ public class Test { private String id; public void setId(String id){ this.id = id; } } List<Test> list = new ArrayList<>(); Test test = new Test(); .原创 2021-08-11 20:07:27 · 1033 阅读 · 0 评论