List<CaseBindImportDTO> uniqueList = importList.stream().collect( collectingAndThen( toCollection(() -> new TreeSet<>(comparing(CaseBindImportDTO::getOrderNo))), ArrayList::new) );