public static < T > Map < Boolean , List < T > > partitionBy ( Collection < T > collection , Predicate < T > predicate ) { return collection . stream ( ) . collect ( partitioningBy ( predicate ) ) ; }
Partition by map .