I am new to java 8. I have written following piece of code:
Stream<Stream<POLine>> list = poSearchResponseList.stream().map(poSearchResponse ->
poSearchResponse.getDeliveryDocumentLines().stream().map(deliveryDocumentLine ->
POLine.builder()
.poLineNumber(deliveryDocumentLine.getPurchaseReferenceLineNumber())
.quantity(deliveryDocumentLine.getExpectedQty())
.vnpkQty(deliveryDocumentLine.getVnpkQty())
.build()));
I want to get
List<POList>
from this right hand expression. Cannot understand how to convert this Stream of stream to a list.