Answers for "stream optional to object"

0

stream optional to object

List<String> filteredList = listOfOptionals.stream()
  .filter(Optional::isPresent)
  .map(Optional::get)
  .collect(Collectors.toList());
Posted by: Guest on December-26-2020

Code answers related to "stream optional to object"

Browse Popular Code Answers by Language