Package de.alpharogroup.collections.set
Class SetExtensions
- java.lang.Object
-
- de.alpharogroup.collections.set.SetExtensions
-
public class SetExtensions extends java.lang.ObjectExtensions class for use withSetobjects
-
-
Constructor Summary
Constructors Constructor Description SetExtensions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> T[]toArray(@NonNull java.util.Set<T> set)Converts the givenSetto an arraystatic <T> java.util.Set<T>toSet(java.util.Collection<T> collection)Converts the givenCollectionto aSetstatic <T> java.util.SortedSet<T>toSortedSet(java.util.Collection<T> collection)Converts the givenCollectionto aSortedSet.
-
-
-
Method Detail
-
toArray
public static <T> T[] toArray(@NonNull @NonNull java.util.Set<T> set)Converts the givenSetto an array- Type Parameters:
T- the generic type- Parameters:
set- the set- Returns:
- the array from the given
Set
-
toSet
public static <T> java.util.Set<T> toSet(java.util.Collection<T> collection)
Converts the givenCollectionto aSet- Type Parameters:
T- the generic type of the elements- Parameters:
collection- the collection- Returns:
- A new
Set
-
toSortedSet
public static <T> java.util.SortedSet<T> toSortedSet(java.util.Collection<T> collection)
Converts the givenCollectionto aSortedSet.- Type Parameters:
T- the generic type of the elements- Parameters:
collection- the collection- Returns:
- A new
SortedSet
-
-