Skip to content

Instantly share code, notes, and snippets.

@iyengarajay
Last active May 20, 2016 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iyengarajay/90a1c7d0c337cf705570e3d1135692ce to your computer and use it in GitHub Desktop.
Save iyengarajay/90a1c7d0c337cf705570e3d1135692ce to your computer and use it in GitHub Desktop.
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