List pdVos = pdVoListList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() ->new TreeSet<>(Comparator.comparing(o -> o.getPiCode() +";" + o.getDeveloperCode()))), ArrayList::new));// 按多個屬性去重列表
Map<String,List<PdVo>> pdVoMap = pdVos.stream().collect(Collectors.groupingBy(PdVo::getDeveloperCode));// 按某個屬性分組
上一篇:如何下載或者保存網頁中的原圖?下一篇:源代碼和模板