de.fesenmeyer.dbnormalizer.core.util
Class SetOperationsUtil

java.lang.Object
  extended by de.fesenmeyer.dbnormalizer.core.util.SetOperationsUtil

public final class SetOperationsUtil
extends Object

Provides some commonly needed set operations.

Author:
DF

Constructor Summary
SetOperationsUtil()
           
 
Method Summary
static
<T> boolean
containsSubset(Set<Set<T>> set1, Set<T> set2)
          Tests if argument set1 contains set2 as a subset.
static
<T> boolean
isProperSubset(Set<T> set1, Set<T> set2)
          Tests if argument set1 is a proper subset of argument set2.
static
<T> boolean
isSubset(Set<T> set1, Set<T> set2)
          Tests if argument set1 is a subset of argument set2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SetOperationsUtil

public SetOperationsUtil()
Method Detail

isSubset

public static <T> boolean isSubset(Set<T> set1,
                                   Set<T> set2)
Tests if argument set1 is a subset of argument set2.

Type Parameters:
T - an arbitrary type
Parameters:
set1 - a Set
set2 - a Set
Returns:
true, if set1 is a subset of set2; false, otherwise

isProperSubset

public static <T> boolean isProperSubset(Set<T> set1,
                                         Set<T> set2)
Tests if argument set1 is a proper subset of argument set2.

Type Parameters:
T - an arbitrary type
Parameters:
set1 - a Set
set2 - a Set
Returns:
true, if set1 is a proper subset of set2; false, otherwise

containsSubset

public static <T> boolean containsSubset(Set<Set<T>> set1,
                                         Set<T> set2)
Tests if argument set1 contains set2 as a subset.

Type Parameters:
T - an arbitrary type
Parameters:
set1 - a Set
set2 - a Set
Returns:
true, if set1 contains set2 as a subset; false, otherwise