MCPcopy Create free account
hub / github.com/Bit0r/java-util / distinctListParam

Method distinctListParam

src/main/java/util/CommonUtils.java:679–687  ·  view source on GitHub ↗

list获取不重复的元素字段 @param list 源数据 @param classifier 去重字段 @return 去重字段set

(List<S> list,Function<? super S, ? extends T> classifier)

Source from the content-addressed store, hash-verified

677 * @return 去重字段set
678 */
679 public static <T, S> Set<T> distinctListParam(List<S> list,Function<? super S, ? extends T> classifier){
680
681 Set<T> set = new LinkedHashSet<T>();
682 for(S s:list) {
683 set.add(classifier.apply(s));
684 }
685
686 return set;
687 }
688}
689
690

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected