Skip to content

Instantly share code, notes, and snippets.

@iyengarajay
Last active May 20, 2016
Embed
What would you like to do?
private static List<String> displayAllTeamNamesFunctional(List<League> leagues)
{
return leagues.stream()
.flatMap(league ->league.getTeams().stream())
.map( team ->team.getName())
.collect(Collectors.toList());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment