org.apache.ode.utils
Class ArrayUtils

java.lang.Object
  extended by org.apache.ode.utils.ArrayUtils

public class ArrayUtils
extends java.lang.Object

Utility class for dealing with arrays.


Field Summary
static java.lang.Class[] EMPTY_CLASS_ARRAY
           
static java.lang.Object[] EMPTY_OBJECT_ARRAY
           
 
Constructor Summary
ArrayUtils()
           
 
Method Summary
static
<T> java.util.Collection<T>
makeCollection(java.lang.Class<? extends java.util.Collection> type, T[] elements)
          Make a Collection out of an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_OBJECT_ARRAY

public static final java.lang.Object[] EMPTY_OBJECT_ARRAY

EMPTY_CLASS_ARRAY

public static final java.lang.Class[] EMPTY_CLASS_ARRAY
Constructor Detail

ArrayUtils

public ArrayUtils()
Method Detail

makeCollection

public static <T> java.util.Collection<T> makeCollection(java.lang.Class<? extends java.util.Collection> type,
                                                         T[] elements)
Make a Collection out of an array.

Parameters:
type - the type of Collection to make.
elements - objects to put into the collection.
Returns:
a Collection of the type given in the type argument containing elements