title: Java 8 Filter Values from a Specific Column in Collection
body: <p>I have a <code>List&lt;DataBean&gt;</code> where the bean is defined as follows,</p>
  
  <pre><code>private int id;
  private int activityId;
  private String info;
  private int answerCode;
  private String otherData;
  </code></pre>
  
  <p>There is another List with a different bean, <code>List&lt;Answer&gt;</code>, with the bean as follows:</p>
  
  <pre><code>   private int id;
     private int code;
  </code></pre>
  
  <p>I need to find all Answers in <code>List&lt;Answer&gt;</code> whose <code>code</code> is contained in the column <code>List&lt;DataBean&gt;.answerCode</code>.</p>
  
  <p><strong>Example:</strong></p>
  
  <p><code>List&lt;DataBean&gt;</code> contains</p>
  
  <pre><code>id  activityId  info answerCode
  1   1           ..   144
  1   1           ..   153
  1   2           ..   160
  1   3           ..   177
  </code></pre>
  
  <p><code>List&lt;Answer&gt;</code> contains</p>
  
  <pre><code>id  code
  --------
  1   160
  2   161
  </code></pre>
  
  <p>Therefore, my result from <code>List&lt;Answer&gt;</code> is just one:   <code>1  160</code>.</p>