I have some java code, see below short snippet
Lets say inclusion = Map<marketplace, string>
and includeRulesMap = Map<string, List<string>>
but I want to transition my inclusion variable into Map<marketplace, List<String>>
with the current code I have is for the current Inclusion:
for(Marketplace marketplace: marketplaces) {
if (x == true) {
includeRulesMap.put(SERVICE, List.of(inclusion.get(marketplace)));
}
how would I transition this into functional code if I want to pass in Inclusion as a Map<marketplace, List> instead of just a Map<marketplace, string>?