I want to filter a list for elements having a non null property and returning that property:
list.stream.map(a -> StringUtils.trimToEmpty(a.getProp())).filter( p -> StringUtils.isNotEmpty(p)).findAny().orElse("");
Do the code above first map all the elements? For efficiency reasons I'd like to process element by element.