org.dozer.util
Class CollectionUtils

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

public final class CollectionUtils
extends Object

Internal class that contains various Collection utilities specific to Dozer requirements. Not intended for direct use by application code.

Author:
tierney.matt, garsombke.franz

Method Summary
static
<T> Object
convertListToArray(List<T> list, Class<T> destEntryType)
           
static List<Object> convertPrimitiveArrayToList(Object primitiveArray)
           
static
<T extends Set<?>>
Set<?>
createNewSet(Class<T> destType)
           
static
<T extends Set<?>>
Set<?>
createNewSet(Class<T> destSetType, Collection<?> srcValue)
           
static int getLengthOfCollection(Object value)
           
static Object getValueFromCollection(Object collection, int index)
           
static boolean isArray(Class<?> aClass)
           
static boolean isCollection(Class<?> aClass)
           
static boolean isList(Class<?> aClass)
           
static boolean isPrimitiveArray(Class<?> aClass)
           
static boolean isSet(Class<?> aClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isArray

public static boolean isArray(Class<?> aClass)

isCollection

public static boolean isCollection(Class<?> aClass)

isList

public static boolean isList(Class<?> aClass)

isSet

public static boolean isSet(Class<?> aClass)

isPrimitiveArray

public static boolean isPrimitiveArray(Class<?> aClass)

getLengthOfCollection

public static int getLengthOfCollection(Object value)

getValueFromCollection

public static Object getValueFromCollection(Object collection,
                                            int index)

createNewSet

public static <T extends Set<?>> Set<?> createNewSet(Class<T> destType)

createNewSet

public static <T extends Set<?>> Set<?> createNewSet(Class<T> destSetType,
                                                     Collection<?> srcValue)

convertListToArray

public static <T> Object convertListToArray(List<T> list,
                                            Class<T> destEntryType)

convertPrimitiveArrayToList

public static List<Object> convertPrimitiveArrayToList(Object primitiveArray)


Copyright © 2005-2011 dozer. All Rights Reserved.