title: Merging list of two objects to create a third object on the basis of common attribute
body: <p>I have two different csv files having data on two different entities and I have to merge two different csv files to create one on the basis of sql join type equijoin and left join.</p>
  
  <p>so I have created first entity as class name Customer having attributes:</p>
  
  <pre><code>int CustomerId ;
  String CustomerName;
  int OrderId;
  </code></pre>
  
  <p>And List of object of this class like:</p>
  
  <pre><code>Customer c1 = new Customer(CustomerId, CustomerName, OrderId);
  1 million objects..
  
  List&lt;Customer&gt; cust = new ArrayList&lt;&gt;();
  cust.add(c1);
  cust.add(c2);
  so on to make list of 1 million object.
  </code></pre>
  
  <p>Similarly, I have created class of second entity Order having attributes:</p>
  
  <pre><code>int orderId;
  String orderName;
  Date orderdate;
  
  Order o1 = new Order(orderId, orderName, orderdate);
  so on 1 million object
  List&lt;Oder&gt; order = new ArrayList&lt;&gt;();
  </code></pre>
  
  <p>Now I need to merge both the object on the basis of orderId and generate third object having result class having all the attributes from both the classes described above.</p>
  
  <p>Please suggest me solution using java stream 8 to map both the streams of list to create inner join and left join type example in the third new result class.</p>