Returns a Collector which partitions the input elements according
to a Predicate, and organizes them into a
Map<Boolean, List<T>>.
The returned Map always contains mappings for both
false and true keys.
There are no guarantees on the type, mutability,
serializability, or thread-safety of the Map or List
returned.
<T> | the type of the input elements | |
predicate | a predicate used for classifying input elements |
Collector implementing the partitioning operation
partitioningBy(Predicate, Collector)
@apiNote
If a partition has no elements, its value in the result Map will be
an empty List.
Diagram: Collectors