摘要:
import lombok.Data; @Data public class Person { public Person() {} public Person(String name, Boolean gender, Integer age, float score) { this.name = 阅读全文
摘要:
默认的 Stream 去重不能根据对象属性去重 创建一个类 import lombok.Data; @Data public class Person { public Person() {} public Person(String name, Boolean gender, Integer ag 阅读全文
摘要:
在业务中有可能要对数据库查询出来的数据进行过滤,这样数据库的排序功能就不能用了,得手写了,Java 8 的 Stream 流提供了很好的排序方法。 假如我们要对 Person 类数组进行排序 @Data public class Person { private String name; priva 阅读全文