title: Convert String array to List of Objects by assigning the string(from array) as one of the parameter of the Object leaving other parameters as null
body: <p>I have a String array </p>
  
  <pre class="lang-java prettyprint-override"><code>adrs[] = {
      "BD Jules Ferry",
      "Rue de Republique",
      "Avenue de Julin"};
  </code></pre>
  
  <p>I have an Object named 'Address'  (//getter setter omitted just for simplicity)</p>
  
  <pre class="lang-java prettyprint-override"><code>public class Address{
  
       adrsLine1 String;
  
       adrsLine2 String;
  
       adrsLine3 String;
  
       postalCode String;
  
  }
  </code></pre>
  
  <p>I want to convert this <code>adrs[]</code> to <code>List&lt;&lt;Address&gt;&gt; addrsList</code>, by assigning each string in the array as <code>adrsLine1</code> parameter of <code>Address</code>.</p>
  
  <p>Once converted each address object in my <code>addrsList</code> will be like,</p>
  
  <ul>
  <li><code>addrsList.get(0)</code> will have [BD Jules Ferry, null, null, null]</li>
  <li><code>addrsList.get(1)</code> will have [Rue de Republique, null, null, null]</li>
  <li><code>addrsList.get(2)</code> will have [Avenue de Julin, null, null, null]</li>
  </ul>
  
  <p>I use Java 8, Currently, I use <code>for loop</code> to achieve this, is there any short cut or more efficient way available in Java 8?</p>
  
  <p><strong>Sample code:</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>private String[] AdrsArray = {"BD Jules Ferry", "Rue de Republique", "Avenue de Julin"};
  
  List&lt;Address&gt; addrsList = new ArrayList&lt;&gt;();
  
  for (String adrsLine : AdrsArray){
      Address address = new ReturnAddress();
      address.setAdrsLine1(adrsLine);
      addrsList.add(address);
  } 
  </code></pre>
  
  <p><strong>Output:</strong></p>
  
  <pre class="lang-java prettyprint-override"><code>Address address = addrsList.get(0); 
  address.getAdrsLine1() //should have "BD Jules Ferry"
  address.getAdrsLine2() //should have null
  address.getAdrsLine3() //should have null
  address.getAdrsPostalCode() //should have null
  </code></pre>