com.sun.appserv.management.util.misc
Class SetUtil

java.lang.Object
  extended by com.sun.appserv.management.util.misc.SetUtil

Deprecated. use GSetUtil

public final class SetUtil
extends Object


Method Summary
static
<T> void
addArray(Set<T> set, T[] array)
          Deprecated. Add all items in an array to a set.
static
<T> HashSet<T>
copySet(Set<T> s1)
          Deprecated. Create a new Set containing all members of another.
static
<T> T
getSingleton(Set<T> s)
          Deprecated.  
static
<T> Set<T>
intersectSets(Set<T> set1, Set<T> set2)
          Deprecated. Return a new Set of all items in both set1 and set2.
static
<T> Set<T>
newNotCommonSet(Set<T> set1, Set<T> set2)
          Deprecated. Return a new Set of all items not common to both sets.
static
<T> Set<T>
newSet(Collection<T> c)
          Deprecated. Create a new Set with one member.
static
<T> Set<T>
newSet(Set<? extends T>[] sets)
          Deprecated. Create a new Set containing all array elements.
static
<T> Set<T>
newSet(Set<? extends T> s1, Set<? extends T> s2)
          Deprecated. Create a new Set consisting of the contents of two sets.
static
<T> Set<T>
newSet(Set<? extends T> s1, Set<? extends T> s2, Set<? extends T> s3)
          Deprecated. Create a new Set consisting of the contents of three sets.
static
<T> Set<T>
newSet(Set<? extends T> s1, Set<? extends T> s2, Set<? extends T> s3, Set<? extends T> s4)
          Deprecated. Create a new Set consisting of the contents of four sets.
static
<T> Set<T>
newSet(T... objects)
          Deprecated. Create a new Set containing all array elements.
static
<T> Set<T>
newSet(T[] objects, int startIndex, int numItems)
          Deprecated. Create a new Set containing all array elements.
static
<T> Set<T>
newSingletonSet(T m1)
          Deprecated. Create a new Set with one member.
static Set<String> newUnmodifiableSet(String[] objects)
          Deprecated.  
static
<T> Set<T>
removeSet(Set<T> set1, Set<T> set2)
          Deprecated. Return a new Set of all items in set1 not in set2.
static Object[] toArray(Set<?> set)
          Deprecated. Convert a Set to a String[]
static String[] toStringArray(Set set)
          Deprecated. Convert a Set to a String[]
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getSingleton

public static <T> T getSingleton(Set<T> s)
Deprecated. 

addArray

public static <T> void addArray(Set<T> set,
                                T[] array)
Deprecated. 
Add all items in an array to a set.


toStringArray

public static String[] toStringArray(Set set)
Deprecated. 
Convert a Set to a String[]


toArray

public static Object[] toArray(Set<?> set)
Deprecated. 
Convert a Set to a String[]


newSet

public static <T> Set<T> newSet(Collection<T> c)
Deprecated. 
Create a new Set with one member.


newSingletonSet

public static <T> Set<T> newSingletonSet(T m1)
Deprecated. 
Create a new Set with one member. Additional items may be added.


copySet

public static <T> HashSet<T> copySet(Set<T> s1)
Deprecated. 
Create a new Set containing all members of another. The returned Set is always a HashSet.


newSet

public static <T> Set<T> newSet(Set<? extends T>[] sets)
Deprecated. 
Create a new Set containing all array elements.


newSet

public static <T> Set<T> newSet(Set<? extends T> s1,
                                Set<? extends T> s2)
Deprecated. 
Create a new Set consisting of the contents of two sets.


newSet

public static <T> Set<T> newSet(Set<? extends T> s1,
                                Set<? extends T> s2,
                                Set<? extends T> s3)
Deprecated. 
Create a new Set consisting of the contents of three sets.


newSet

public static <T> Set<T> newSet(Set<? extends T> s1,
                                Set<? extends T> s2,
                                Set<? extends T> s3,
                                Set<? extends T> s4)
Deprecated. 
Create a new Set consisting of the contents of four sets.


newUnmodifiableSet

public static Set<String> newUnmodifiableSet(String[] objects)
Deprecated. 

newSet

public static <T> Set<T> newSet(T... objects)
Deprecated. 
Create a new Set containing all array elements.


newSet

public static <T> Set<T> newSet(T[] objects,
                                int startIndex,
                                int numItems)
Deprecated. 
Create a new Set containing all array elements.


intersectSets

public static <T> Set<T> intersectSets(Set<T> set1,
                                       Set<T> set2)
Deprecated. 
Return a new Set of all items in both set1 and set2.


removeSet

public static <T> Set<T> removeSet(Set<T> set1,
                                   Set<T> set2)
Deprecated. 
Return a new Set of all items in set1 not in set2.


newNotCommonSet

public static <T> Set<T> newNotCommonSet(Set<T> set1,
                                         Set<T> set2)
Deprecated. 
Return a new Set of all items not common to both sets.