Package org.apache.camel.converter
Class CollectionConverter
- java.lang.Object
-
- org.apache.camel.converter.CollectionConverter
-
@Converter(generateLoader=true) public final class CollectionConverter extends Object
Some core java.util Collection based Type Converters
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object[]
toArray(Collection<?> value)
Converts a collection to an arraystatic <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(Iterable<T> iterable)
static List<Object>
toList(Object[] array)
Converts an array to a collectionstatic <T> List<T>
toList(Collection<T> collection)
Converts a collection to a List if it is not alreadystatic Properties
toProperties(Map<Object,Object> map)
static Set<Object>
toSet(Object[] array)
static <T> Set<T>
toSet(Collection<T> collection)
static <K,V>
Set<Map.Entry<K,V>>toSet(Map<K,V> map)
-
-
-
Method Detail
-
toArray
@Converter public static Object[] toArray(Collection<?> value)
Converts a collection to an array
-
toList
@Converter public static List<Object> toList(Object[] array)
Converts an array to a collection
-
toList
@Converter public static <T> List<T> toList(Collection<T> collection)
Converts a collection to a List if it is not already
-
toSet
@Converter public static <T> Set<T> toSet(Collection<T> collection)
-
toProperties
@Converter public static Properties toProperties(Map<Object,Object> map)
-
toHashtable
@Converter public static <K,V> Hashtable<K,V> toHashtable(Map<? extends K,? extends V> map)
-
toHashMap
@Converter public static <K,V> HashMap<K,V> toHashMap(Map<? extends K,? extends V> map)
-
-