ucot.utils
Class Sets

java.lang.Object
  extended by ucot.utils.Sets

public class Sets
extends java.lang.Object

Operations to use sets.

Author:
pajumasu

Constructor Summary
Sets()
           
 
Method Summary
static
<T> java.util.Set<T>
intersection(java.util.Set<T> set1, java.util.Set<T> set2)
          Item must be in both sets to be in the resulting set.
static
<T> java.util.Set<T>
missing(java.util.Set<T> set1, java.util.Set<T> set2)
          Returns set items that are missing in second set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sets

public Sets()
Method Detail

intersection

public static <T> java.util.Set<T> intersection(java.util.Set<T> set1,
                                                java.util.Set<T> set2)
Item must be in both sets to be in the resulting set.

Type Parameters:
T - The type of the items.
Parameters:
set1 - The first set.
set2 - The second set.
Returns:
The intersection of both sets.

missing

public static <T> java.util.Set<T> missing(java.util.Set<T> set1,
                                           java.util.Set<T> set2)
Returns set items that are missing in second set.

Type Parameters:
T -
Parameters:
set1 -
set2 -
Returns:
The set of items that ar in set2 but not in set1.