org.dbunit.util
Class CollectionsHelper

java.lang.Object
  extended by org.dbunit.util.CollectionsHelper

public class CollectionsHelper
extends Object

Helper for collections-related methods.

Since:
Nov 5, 2005
Version:
$Revision: 797 $ $Date: 2008-08-29 10:38:12 +0200 (Fri, 29 Aug 2008) $
Author:
Felipe Leme (dbunit@felipeal.net), gommma (gommma AT users.sourceforge.net), Last changed by: $Author: gommma $

Method Summary
static Set objectsToSet(Object[] objects)
          Returns a Set from an array of objects.
static Object[] setToObjects(Set set)
          Returns an array of Objects from a Set.
static String[] setToStrings(Set set)
          Returns an array of Strings from a Set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

objectsToSet

public static Set objectsToSet(Object[] objects)
Returns a Set from an array of objects. Note the Iterator returned by this Set preserves the order of the array.

Parameters:
objects - array of objects
Returns:
Set with the elements of the array or null if entry is null

setToObjects

public static Object[] setToObjects(Set set)
Returns an array of Objects from a Set.

Parameters:
set - a Set
Returns:
array of Objects with the elements of the Set or null if set is null

setToStrings

public static String[] setToStrings(Set set)
Returns an array of Strings from a Set.

Parameters:
set - a Set of Strings
Returns:
array of Strings with the elements of the Set or null if set is null


Copyright © 2002-2012. All Rights Reserved.