List<BillingRealCostDto> sorted = realCostDtos.stream().sorted(Comparator.comparingInt(BillingRealCostDto::getMonth)).collect(toList());
jdk1.8 集合中对象按照属性递增排序
最新推荐文章于 2023-07-24 13:57:07 发布
List<BillingRealCostDto> sorted = realCostDtos.stream().sorted(Comparator.comparingInt(BillingRealCostDto::getMonth)).collect(toList());