Java 8 Stream add elements to list and sum
<p>I believe I can do next using one stream operation on listOfPricedObjects:</p>

<pre><code>List&lt;BigDecimal&gt; myList = new ArrayList();
myList = listOfPricedObjects.stream().map(PricedObject::getPrice).collect(Collectors.toList());
BigDecimal sum = listOfPricedObjects.stream().map(PricedObject::getPrice).reduce(BigDecimal.ZERO, BigDecimal::add)
</code></pre>

<p>How I can fill myList with prices and calculate sum of prices using stream one time? 
Thanks</p>

<p>UPD: As the result I need myList filled with prices and sum variable with sum. But not with usding stream() twice for that.</p>