title: Java stream of optionals to optional stream
body: <p>I need to convert <code>Stream&lt;Optional&lt;Integer&gt;&gt;</code> to <code>Optional&lt;Stream&lt;Integer&gt;&gt;</code>.</p>
  
  <p>The output <code>Optional&lt;Stream&lt;Integer&gt;&gt;</code> should be an empty value when at least one value of<code>Stream&lt;Optional&lt;Integer&gt;&gt;</code> is empty. </p>
  
  <p>Do you know any functional way to solve the problem? I tried to use <code>collect</code> method, but without success.</p>