title: Java 8 optional list
body: <p>I am trying to achieve following:
  Given an list of  object. Return starting 5 object which fulfill a criteria. </p>
  
  <p>I am able to first element:</p>
  
  <pre><code>optionServiceObject.map((p) -&gt; (List&lt;ServiceAttribute&gt;) p.getFoor())
                     .flatMap((v2) -&gt; v2.stream().filter((v3) -&gt; v3.hasBar())
                     .map(v3 -&gt; v3.getBar())
                     .findFirst()
  </code></pre>
  
  <p>But unable to get, how to get starting 5 element matching the criteria into list. </p>