title: Map more than 1 property of custom List object in java 8
body: <p>I have below custom List object <code>List&lt;Person&gt; personList</code></p>
  
  <pre><code>class Person(){
      String name;
      String age;
      String countryName;
      String stateName;
  // getter and setter for all property
  }
  </code></pre>
  
  <p>if i want to map <code>personList</code> based on countryName or StateName then i will do :</p>
  
  <pre><code>List&lt;String&gt; countryName = personList.stream().map(Person :: getCountryName)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>List&lt;String&gt; stateName = personList.stream().map(Person :: getStateName)
  </code></pre>
  
  <p>But now i want to mapping personList based on CountryName and StateName in new custom List Object <code>List&lt;Country&gt; countryandStateList</code></p>
  
  <pre><code>class Country(){
      String countryName;
      String stateName;
  // getter and setter for CountryName and StateName
  }
  </code></pre>
  
  <p>How would i do this?</p>