Set<Team> teams = new HashSet<>();
for (Team team : scenario.getTeamsActive()) {
for (UserAsLearner userAsLearner : learners) {
if(team.getLearners().contains(userAsLearner)) {
teams.add(team);
break;
}
}
}
List<String> OSes = Arrays
.asList(new String[] { "windows", "dos", "mac", "linux" });
Map<String, String> defaultBrowsers = new HashMap<>();
defaultBrowsers.put("windows", "Chrome");
defaultBrowsers.put("linux", "Firefox");
defaultBrowsers.put("mac", "Safari");
List<String> result = OSes.stream().filter(o -> {
return (defaultBrowsers.containsKey(o)) ? true : false;
}).collect(Collectors.toList());