List<MSbsHouseBoxVo> boxVoList = new ArrayList<>(voList.stream()
.collect(
Collectors.toCollection(
() -> new TreeSet<>(
Comparator.comparing(tc -> tc.getHouseName())
)
)
));
ArrayList<MSbsHouseBoxVo> boxVoList = voList.stream()
.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(MSbsHouseBoxVo::getHouseName))), ArrayList::new));
https://blog.csdn.net/baidu_33403616/article/details/121465503