org.dbunit.util
Class CollectionsHelper

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

public class CollectionsHelper
extends java.lang.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 ([email protected]), gommma (gommma AT users.sourceforge.net), Last changed by: $Author: gommma $

Method Summary
static java.util.Set objectsToSet(java.lang.Object[] objects)
          Returns a Set from an array of objects.
static java.lang.Object[] setToObjects(java.util.Set set)
          Returns an array of Objects from a Set.
static java.lang.String[] setToStrings(java.util.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 java.util.Set objectsToSet(java.lang.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 java.lang.Object[] setToObjects(java.util.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 java.lang.String[] setToStrings(java.util.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-2008. All Rights Reserved.