title: How to limit the number of iterations through the List
body: <p>How I can limit the result of an iterator over my List?</p>
  
  <pre><code>try {
      ArrayList&lt;CalanderQueryOutput&gt; results = new ArrayList&lt;CalanderQueryOutput&gt;();
  
      List&lt;?&gt; eventsToday = (List&lt;?&gt;) filter.filter(calendar.getComponents(Component.VEVENT));
      CalanderQueryOutput caldavOutput = new CalanderQueryOutput();
  
      for (Iterator&lt;?&gt; i = eventsToday.iterator(); i.hasNext();) {
      }
      results.add(caldavOutput);
  }
  </code></pre>
  
  <p>I want list only maximum ten results</p>