partition
Description:
Partitions the elements based on the pred function and returns the results in a map.
The result map always contains lists for both true and false keys. There are no guarantees on the type, mutability, or thread-safety of the returned map and list.
This is equivalent to:
seq.collect( Collectors.partition(pred) );
This is a terminal operation.
Parameters:
pred |
a predicate function |
Returns:
a future of the result map |