|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.util.CollectionHelper
public final class CollectionHelper
A number of helper methods for working with collections
Method Summary | ||
---|---|---|
static void |
appendValue(java.util.Map map,
java.lang.Object key,
java.lang.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 java.lang.String |
collectionAsCommaDelimitedString(java.util.Collection<?> col)
|
|
static java.lang.String |
collectionAsCommaDelimitedString(java.lang.String[] col)
|
|
static
|
createSetContaining(T... contents)
|
|
static java.lang.Integer |
size(java.lang.Object value)
Returns the size of the collection if it can be determined to be a collection |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.Integer size(java.lang.Object value)
value
- the collection
public static void appendValue(java.util.Map map, java.lang.Object key, java.lang.Object value)
map
- the map to add the entry tokey
- the key in the mapvalue
- the value to put in the mappublic static <T> java.util.Set<T> createSetContaining(T... contents)
public static java.lang.String collectionAsCommaDelimitedString(java.lang.String[] col)
public static java.lang.String collectionAsCommaDelimitedString(java.util.Collection<?> col)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |