ModelComponentToVerilogConverter can now convert TriStateBuffers
[Mograsim.git] / plugins / net.mograsim.logic.model.verilog / src / net / mograsim / logic / model / verilog / utils / CollectionsUtils.java
1 package net.mograsim.logic.model.verilog.utils;
2
3 import java.util.HashSet;
4 import java.util.Set;
5
6 public class CollectionsUtils
7 {
8         private CollectionsUtils()
9         {
10         }
11
12         @SafeVarargs
13         public static <E> Set<E> union(Set<E>... sets)
14         {
15                 Set<E> union = new HashSet<>();
16                 for (Set<E> set : sets)
17                         union.addAll(set);
18                 return Set.copyOf(union);
19         }
20 }