MCPcopy Create free account
hub / github.com/LFYSec/MScan / concatDistinct

Method concatDistinct

src/main/java/pascal/taie/util/collection/Lists.java:70–75  ·  view source on GitHub ↗

Concatenates two lists and removes duplicate items in the resulting list.

(
            List<? extends T> list1, List<? extends T> list2)

Source from the content-addressed store, hash-verified

68 * Concatenates two lists and removes duplicate items in the resulting list.
69 */
70 public static <T> List<T> concatDistinct(
71 List<? extends T> list1, List<? extends T> list2) {
72 Set<T> set = new LinkedHashSet<>(list1);
73 set.addAll(list2);
74 return List.copyOf(set);
75 }
76}

Callers 2

mergeWithMethod · 0.95
mergeWithMethod · 0.95

Calls 1

addAllMethod · 0.65

Tested by

no test coverage detected