java 對象去重
List<JzInfo> List = jzInfoList.stream()
.collect(Collectors.collectingAndThen(
Collectors.toCollection(() ->
new TreeSet<>(Comparator.comparing(
o -> o.getLac() + ";" + o.getCid()))),
ArrayList::new));
實體類需要重寫hashCode() 和 eqauls()

image.png
如此即可