public static <T> Collector<T, ?, Map<Boolean, List<T>>> partitioningBy (Predicate<? super T> predicate)

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.

Parameters:
<T>    the type of the input elements
predicate    a predicate used for classifying input elements

Returns:  a Collector implementing the partitioning operation

See also:
partitioningBy(Predicate, Collector)

@apiNote If a partition has no elements, its value in the result Map will be an empty List.