Partitioning is a another grouping approach, in which the resultant Map contains two different groups, one for true values and another for false values. In our example we have partition input stream base on Gender condition as Predicate
predicate = p -> p.getGender() == Gender.MALE.
Read More