Class CollectionsHelper

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

public class CollectionsHelper extends Object
Helper for collections-related methods.
Since:
Nov 5, 2005
Version:
$Revision$ $Date$
Author:
Felipe Leme (dbunit@felipeal.net), gommma (gommma AT users.sourceforge.net), Last changed by: $Author$
  • Method Details

    • 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