Skip to content

Instantly share code, notes, and snippets.

@juliandescottes
Created July 24, 2015 12:03
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 juliandescottes/2aacf075132a045ebfd8 to your computer and use it in GitHub Desktop.
Save juliandescottes/2aacf075132a045ebfd8 to your computer and use it in GitHub Desktop.
protected <I, O> List<O> mapToList(List<I> list, Function<I, O> method) {
return list.stream().map((I item) -> method.apply(item)).collect(Collectors.toList());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment