title: Retrieving a List from a java.util.stream.Stream in Java 8
body: <p>I was playing around with Java 8 lambdas to easily filter collections. But I did not find a concise way to retrieve the result as a new list within the same statement. Here is my most concise approach so far:</p>
  
  <pre><code>List&lt;Long&gt; sourceLongList = Arrays.asList(1L, 10L, 50L, 80L, 100L, 120L, 133L, 333L);
  List&lt;Long&gt; targetLongList = new ArrayList&lt;&gt;();
  sourceLongList.stream().filter(l -&gt; l &gt; 100).forEach(targetLongList::add);
  </code></pre>
  
  <p>Examples on the net did not answer my question because they stop without generating a new result list. There must be a more concise way. I would have expected, that the <code>Stream</code> class has methods as <code>toList()</code>, <code>toSet()</code>, …</p>
  
  <p>Is there a way that the variables <code>targetLongList</code> can be directly be assigned by the third line?</p>