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

Method toCombinedSet

src/main/java/pascal/taie/util/collection/Views.java:287–290  ·  view source on GitHub ↗

Given two sets, creates an immutable view set consisting of elements of the two sets. WARNING: this implementation simply treats two sets as one set and does not guarantee the uniqueness of elements. It is responsibility of the client code to guarantee that the elements in set1 and {@cod

(
            Set<? extends T> set1, Set<? extends T> set2)

Source from the content-addressed store, hash-verified

285 * and {@code set2}
286 */
287 public static <T> Set<T> toCombinedSet(
288 Set<? extends T> set1, Set<? extends T> set2) {
289 return Collections.unmodifiableSet(new CombinedSetView<>(set1, set2));
290 }
291
292 private static class CombinedSetView<T> extends AbstractSet<T> {
293

Callers 1

testCombinedSetMethod · 0.95

Calls

no outgoing calls

Tested by 1

testCombinedSetMethod · 0.76