public final class SetExtensions
extends java.lang.Object
Set objects| Modifier and Type | Method and Description |
|---|---|
static <T> T[] |
toArray(java.util.Set<T> set)
Converts the given
Set to an array |
static <T> java.util.Set<T> |
toSet(java.util.Collection<T> collection)
Converts the given
Collection to a Set |
static <T> java.util.SortedSet<T> |
toSortedSet(java.util.Collection<T> collection)
Converts the given
Collection to a SortedSet. |
public static <T> T[] toArray(java.util.Set<T> set)
Set to an arrayT - the generic typeset - the setSetpublic static <T> java.util.Set<T> toSet(java.util.Collection<T> collection)
Collection to a SetT - the generic type of the elementscollection - the collectionSetpublic static <T> java.util.SortedSet<T> toSortedSet(java.util.Collection<T> collection)
Collection to a SortedSet.T - the generic type of the elementscollection - the collectionSortedSet