title: How to get Value of object from list of objects by Using Stream API
body: <p>From the below code require to get values based on type from List,</p>
  <pre><code>List&lt;Type&gt; types= Arrays.asList(new Type(&quot;type1&quot;,&quot;Values1&quot;),new Type(&quot;type2&quot;,&quot;Values2&quot;));
  
  List&lt;AnotherType&gt; anotherTypes = new ArrayList&lt;&gt;();
  
  for (Type type:types){
      AnotherType  anotherType = new AnotherType();
      
      anotherType.settype1Value(?);
      anotherType.settype2Value(?);
  
      anotherTypes.add(anotherType);
  }
  </code></pre>
  <p>easy way to find values in the ?.</p>