title: Cast Object[] to another type
body: <p>I have class A and class B,  where  class B  requires only 5 of 10 properties from A. </p>
  
  <p>So i have something like,</p>
  
  <p><code>A[]  objArray = populateResponse();</code></p>
  
  <p>And to cast it into B , i do something like</p>
  
  <p><code>for (A : objArray ){
  // getters here and  push it to B obj array manually 
  }</code></p>
  
  <p>Any other suggestions to do it in a better way since A has many fields and size of the array can grow large ? </p>
  
  <p>Thanks  in advance !</p>