Set<String> set= list.stream().map(实体::get属性).collect(Collectors.toSet));
stream流把list中的某个属性转为set
于 2022-07-27 14:44:31 首次发布
Set<String> set= list.stream().map(实体::get属性).collect(Collectors.toSet));