purList = purList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(priceVO :: getLineId))), ArrayList::new))