title: How to get fields from list of objects and set to another collection of object
body: <p>Here, I have to get fields from list of objects and set to another collection of object</p>
  <pre><code>class RoomType {
  
  private List&lt;RatePlan&gt; ratePlans = null;
  
  
  }
  
  class RatePlan {
  
  private String ratePlanCode;
  private String ratePanName;
  }
  
  =============================
  to map to...
  
  class TravelResponse {
  
  private Collection&lt;RatePlan&gt; ratePlans = null;
  
  
  }
  
  class RatePlan {
  
  private String ratePlanCode;
  private String ratePanDescription;
  }
  </code></pre>
  <p>RoomType contains the data, this data has to be mapped to TravelResponse.
  RoomType -&gt; RatePlan is list and TravelResponse -&gt; RatePlan is collection</p>
  <p>Mapping should be .....
  RoomType.RatePlan.ratePlanCode = TravelResponse.RatePlan.ratePlanCode
  RoomType.RatePlan.ratePanName  = TravelResponse.RatePlan.ratePanDescription</p>