Class FlowableCollectors
java.lang.Object
com.flowable.platform.common.util.FlowableCollectors
Util class for creating different
Collector
(s) that are not part of the Java Collectors
utils.- Author:
- Filip Hrisafov
-
Method Summary
Modifier and TypeMethodDescriptiontoListWithSize
(int size) Returns aCollector
that accumulates the input elements into a newList
The created list is list that hassize
as the initial capacity.toSetWithSize
(int expectedSize) Returns aCollector
that accumulates the input elements into a newSet
.
-
Method Details
-
toListWithSize
Returns aCollector
that accumulates the input elements into a newList
The created list is list that hassize
as the initial capacity.- Type Parameters:
T
- the type of the input elements- Returns:
- a
Collector
which collects all the input elements into aList
, in encounter order
-
toSetWithSize
Returns aCollector
that accumulates the input elements into a newSet
. The created set is a set that hassize
as the expected initial size (taking the load factor into consideration).- Type Parameters:
T
- the type of the input elements- Returns:
- a
Collector
which collects all the input elements into aSet
-