public final class CollectionHelper extends Object
Modifier and Type | Method and Description |
---|---|
static void |
appendValue(Map<String,Object> map,
String key,
Object value)
Sets the value of the entry in the map for the given key, though if the
map already contains a value for the given key then the value is appended
to a list of values.
|
static String |
collectionAsCommaDelimitedString(Collection<?> col) |
static String |
collectionAsCommaDelimitedString(String[] col) |
static <T> Set<T> |
createSetContaining(T... contents) |
static Integer |
size(Object value)
Returns the size of the collection if it can be determined to be a collection
|
public static Integer size(Object value)
value
- the collectionpublic static void appendValue(Map<String,Object> map, String key, Object value)
map
- the map to add the entry tokey
- the key in the mapvalue
- the value to put in the mappublic static <T> Set<T> createSetContaining(T... contents)
public static String collectionAsCommaDelimitedString(String[] col)
public static String collectionAsCommaDelimitedString(Collection<?> col)
Apache Camel