public class CollectionUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <K,V,C extends Collection<V>> |
addConcurrent(K key,
C values,
ConcurrentMap<K,C> map)
If map already has a value associated with the key it adds values to that
value, otherwise it will put values to the map.
|
static <T> boolean |
isEqual(Iterable<T> first,
Iterable<T> second)
Helper method to check if iterables are equal.
|
public static <K,V,C extends Collection<V>> C addConcurrent(K key, C values, ConcurrentMap<K,C> map)
K
- KeyV
- ValueC
- Collectionkey
- Key under which we are adding valuesvalues
- Values we want to addmap
- Map which we are adding values topublic static <T> boolean isEqual(Iterable<T> first, Iterable<T> second)
T
- Type to comparefirst
- First iterablesecond
- Second iterableCopyright © 2011-2020 The Apache Software Foundation. All Rights Reserved.