org.dbmaintain.util
Class CollectionUtils
java.lang.Object
org.dbmaintain.util.CollectionUtils
public class CollectionUtils
- extends Object
Class containing collection related utilities
- Author:
- Filip Neven, Tim Ducheyne
Method Summary |
static
|
asSet(T... elements)
Converts the given array of elements to a set. |
static
|
asSortedSet(T... elements)
Converts the given array of elements to a sortedset. |
static
|
unionSortedSet(Set<T>... sets)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CollectionUtils
public CollectionUtils()
asSet
public static <T> Set<T> asSet(T... elements)
- Converts the given array of elements to a set.
- Parameters:
elements
- The elements
- Returns:
- The elements as a set, empty if elements was null
asSortedSet
public static <T> SortedSet<T> asSortedSet(T... elements)
- Converts the given array of elements to a sortedset.
- Parameters:
elements
- The elements
- Returns:
- The elements as a set, empty if elements was null
unionSortedSet
public static <T> SortedSet<T> unionSortedSet(Set<T>... sets)
Copyright © 2011. All Rights Reserved.