title: Java: convert list of objects to something else
body: <p>I have a class that has a list of Events.</p>
  
  <pre><code>public class EventScheduler{
  
       List&lt;Event&gt; event
  
  }
  
  public class Event{
  
       private String text;
       private int timestamp;
  
  }
  </code></pre>
  
  <p>I have an EventView, it takes an Event as a constructor and has getters and no setters.</p>
  
  <p>It is basically allows subset of variables set in event to be viewed, whilst acting in a similar fashion to Event.</p>
  
  <pre><code>public class EventView{
  
       public EventView(Event event){
           this.event = event;
       }
  
       public String getText(){
           return event.getText();
       }
  
       //no timestamp getter as its not allowed for this view object.
  }
  </code></pre>
  
  <p>So with this setup, what is the quickest way to convert a <code>List&lt;Event&gt;</code> to <code>List&lt;EventView&gt;</code>?
  Or some kind of alternative.</p>