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 aCollectorthat accumulates the input elements into a newListThe created list is list that hassizeas the initial capacity.toSetWithSize(int expectedSize) Returns aCollectorthat accumulates the input elements into a newSet.
-
Method Details
-
toListWithSize
Returns aCollectorthat accumulates the input elements into a newListThe created list is list that hassizeas the initial capacity.- Type Parameters:
T- the type of the input elements- Returns:
- a
Collectorwhich collects all the input elements into aList, in encounter order
-
toSetWithSize
Returns aCollectorthat accumulates the input elements into a newSet. The created set is a set that hassizeas the expected initial size (taking the load factor into consideration).- Type Parameters:
T- the type of the input elements- Returns:
- a
Collectorwhich collects all the input elements into aSet
-