public class FlowableExpressionCollectionUtils extends Object
Collections (Lists, Sets etc.) as well as Maps.| Constructor and Description |
|---|
FlowableExpressionCollectionUtils() |
| Modifier and Type | Method and Description |
|---|---|
<T> List<T> |
distinct(Collection<T> collection)
Deletes all duplicates from a list while retaining order.
|
List |
emptyList()
Creates a new list, for instance to be used in an Initialize Variables Service Task.
|
Map |
emptyMap()
Creates a new map, for instance to be used in an Initialize Variables Service Task.
|
<T> List<T> |
listWithElements(T... elements)
Creates a new list with as many elements as desired.
|
<T> List<T> |
mergeCollections(Collection<T>... collections)
Merges several collections into a list.
|
<K,V> Map<K,V> |
updateMap(Map<K,V> map,
K key,
V newValue)
Inserts or updates a value depending on whether it exists or not and returns the updated map.
|
public List emptyList()
Listpublic Map emptyMap()
Map@SafeVarargs public final <T> List<T> listWithElements(T... elements)
T - the type of the listelements - the elements to add to the new collection@SafeVarargs public final <T> List<T> mergeCollections(Collection<T>... collections)
T - type of the collectioncollections - collections to be mergedpublic <T> List<T> distinct(Collection<T> collection)
T - type of the listcollection - the base collectionpublic <K,V> Map<K,V> updateMap(Map<K,V> map, K key, V newValue)
K - the type of the keyV - the type of the valuemap - the map to be updatedkey - the key within the map to be updatednewValue - the new valueCopyright © 2019. All rights reserved.