I have a list of objects with two String
fields like
Name1, Active
Name2, InActive
Name3, InActive
Name4, Active
And I would like to have a
Map<Boolean, List<String>>
where Active=true and InActive=false.
I tried
active = dualFields.stream().collect(
Collectors.groupingBy(
x -> StringUtils.equals(x.getPropertyValue(), "Active")));
But I received
Map<Boolean, List<DualField>>