@@ -0,0 +1,1233 @@
+/*%0A * Copyright (c) 2012 Mateusz Parzonka, Eric Bodden%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A *%0A * Contributors:%0A * Mateusz Parzonka - initial API and implementation%0A */%0Apackage prm4j.logic;%0A%0Aimport java.util.Set;%0Aimport java.util.HashSet;%0A%0Apublic class SetUtil %7B%0A%0A    private SetUtil() %7B%0A%09// not instantiable%0A    %7D%0A%0A    public static %3CT%3E Set%3CT%3E union(Set%3CT%3E set1, Set%3CT%3E set2) %7B%0A%09Set%3CT%3E result = new HashSet%3CT%3E(set1);%0A%09result.addAll(set2);%0A%09return result;%0A    %7D%0A%0A    public static %3CT%3E Set%3CT%3E intersection(Set%3CT%3E set1, Set%3CT%3E set2) %7B%0A%09Set%3CT%3E result = new HashSet%3CT%3E();%0A%09for (T e : set1)%0A%09    if (set2.contains(e))%0A%09%09result.add(e);%0A%09return result;%0A    %7D%0A%0A    public static %3CT%3E Set%3CT%3E difference(Set%3CT%3E set1, Set%3CT%3E set2) %7B%0A%09Set%3CT%3E result = new HashSet%3CT%3E(set1);%0A%09result.removeAll(set2);%0A%09return result;%0A    %7D%0A%0A    public static %3CT%3E boolean isSubset(Set%3CT%3E set1, Set%3CT%3E set2) %7B%0A%09return set2.containsAll(set1);%0A    %7D%0A%0A    public static %3CT%3E boolean isSuperset(Set%3CT%3E set1, Set%3CT%3E set2) %7B%0A%09return set1.containsAll(set2);%0A    %7D%0A%0A%7D%0A

Add util class for set operations