title: Java 8 list processing - add elements conditionally
body: <p>I have the following piece of code:</p>
  
  <pre><code>List&lt;Object&gt; list = new ArrayList&lt;&gt;();
  list.addAll(method1());
  if(list.isEmpty()) { list.addAll(method2()); }
  if(list.isEmpty()) { list.addAll(method3()); }
  if(list.isEmpty()) { list.addAll(method4()); }
  if(list.isEmpty()) { list.addAll(method5()); }
  if(list.isEmpty()) { list.addAll(method6()); }
  return list;
  </code></pre>
  
  <p>Is there a nice way to add elements conditionally, maybe using stream operations? I would like to add elements from method2 only if the list is empty otherwise return and so on. </p>
  
  <p>Edit: It's worth to mention that the methods contain heavy logic so need to be prevented from execution.  </p>