Java Stream multi list iteration
<p>I have 2 lists. 1 list is of Ids and the other list is full of <code>Foo</code> objects, call it list A. The <code>Foo</code> class looks like this:</p>

<pre><code>public class Foo {
    private String id;
    /* other member variables */

    Foo(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }
}
</code></pre>

<p>I have a plain list of ids like <code>List&lt;Integer&gt;</code>, call it list B. What I want to do is iterate over list B one element at a time, grab the id, compare it to list A and grab <code>Foo</code> object with the equivalent id and then add the <code>Foo</code> object to a new list, list C.</p>

<p>I'm trying to concatenate streams but I'm new to streams and I'm getting bogged down with all the methods like <code>map</code>, <code>filter</code>, <code>forEach</code>. I'm not sure what to use when. </p>