Java 8 Lambda To Handle for > if > else
<p>I need to run two different tasks based on a whole mess of filters</p>

<p>I'm just now grasping the concept of Lambdas, so I guess my question is, how do you handle multiple "else" conditions containing complicated logic... within a Lambda?</p>

<p>I know I can use filter and map to select certain pieces of data. How does "nesting" work with filters?</p>

<p>Could I do something like:</p>

<pre><code>//Iterate over list of sites
sites.stream()
//Check if current site is active
.map(isActive ? 
//{Do something with site because site is active};
//Set a variable for later user maybe?
:
//{Do something else involving the current site because it's not?};
//Set a different variable maybe?
);

//use variable from first map?
</code></pre>

<p>Can someone provide me with some proper syntax and maybe a basic explanation of what I'm doing to my data when I run through these abstract processes that are doing me a bamboozle.</p>

<p>Secondly, if I wanted to run these two map processes in parallel, would I just do this?</p>

<pre><code>sites.stream().parallel()?
</code></pre>

<p>As usual, thanks for helping with my ignorance!</p>