org.dbmaintain.util
Class CollectionUtils

java.lang.Object
  extended by org.dbmaintain.util.CollectionUtils

public class CollectionUtils
extends Object

Class containing collection related utilities

Author:
Filip Neven, Tim Ducheyne

Constructor Summary
CollectionUtils()
           
 
Method Summary
static
<T> Set<T>
asSet(T... elements)
          Converts the given array of elements to a set.
static
<T> SortedSet<T>
asSortedSet(T... elements)
          Converts the given array of elements to a sortedset.
static
<T> SortedSet<T>
unionSortedSet(Set<T>... sets)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionUtils

public CollectionUtils()
Method Detail

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.