@Converter public final class CollectionConverter extends Object
Modifier and Type | Method and Description |
---|---|
static Object[] |
toArray(Collection<?> value)
Converts a collection to an array
|
static <T> ArrayList<T> |
toArrayList(Iterator<T> it)
|
static <K,V> HashMap<K,V> |
toHashMap(Map<? extends K,? extends V> map) |
static <K,V> Hashtable<K,V> |
toHashtable(Map<? extends K,? extends V> map) |
static <T> List<T> |
toList(Collection<T> collection)
Converts a collection to a List if it is not already
|
static <T> List<T> |
toList(Iterable<T> iterable)
|
static List<Object> |
toList(Object[] array)
Converts an array to a collection
|
static Properties |
toProperties(Map<Object,Object> map) |
static <T> Set<T> |
toSet(Collection<T> collection) |
static <K,V> Set<Map.Entry<K,V>> |
toSet(Map<K,V> map) |
static Set<Object> |
toSet(Object[] array) |
@Converter public static Object[] toArray(Collection<?> value)
@Converter public static List<Object> toList(Object[] array)
@Converter public static <T> List<T> toList(Collection<T> collection)
@Converter public static <T> ArrayList<T> toArrayList(Iterator<T> it)
@Converter public static Set<Object> toSet(Object[] array)
@Converter public static <T> Set<T> toSet(Collection<T> collection)
@Converter public static <K,V> Set<Map.Entry<K,V>> toSet(Map<K,V> map)
@Converter public static Properties toProperties(Map<Object,Object> map)
@Converter public static <K,V> Hashtable<K,V> toHashtable(Map<? extends K,? extends V> map)
@Converter public static <K,V> HashMap<K,V> toHashMap(Map<? extends K,? extends V> map)
@Converter public static <T> List<T> toList(Iterable<T> iterable)
Apache Camel