List<CatTest> catList = Lists.newArrayList();
catList.stream()
.collect(
Collectors.collectingAndThen(
Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(cat -> cat.getCarHobby() + cat.getCatName()))),
ArrayList::new
)
);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2021-04-30
  • 2022-12-23
  • 2022-12-23
  • 2021-11-21
猜你喜欢
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2021-11-27
相关资源
相似解决方案