public class ProductFamilyProcessUI implements Comparable {
private String id;
private int seqNo;
private DepartmentUI department;
private ProcessGroupUI processGroup;
private ProcessUI process;
private ProcessFlowType processFlowType;
private Map<String, OutsourceToStatusEnum> outSourceToStatuses;
}
The ProductFamilyProcessUI is a list that I get in a request, I want to stream the outsourceToStatuses into another map of the same type.
Map<String, OutsourceToStatusEnum> outsourceToStatusEnumMap = productFamilyProcessUIList1
.stream()
.map(ProductFamilyProcessUI::getOutSourceToStatuses)
.collect(Collectors.toMap());
I tried this but it expects input in Collectors.toMap().