title: Need to remove elements from an ArrayList of ArrayLists<Double>
body: <p>I have code that processes wav files and sorts collections of double values (audio samples) into an ArrayList and each of these ArrayLists is then sorted into an ArrayList of ArrayLists: </p>
  
  <pre><code>ArrayList&lt;Double&gt; sampleEvent = new ArrayList&lt;Double&gt;();
  
  ArrayList&lt;ArrayList&lt;Double&gt;&gt; EventsCollect = new ArrayList&lt;ArrayList&lt;Double&gt;&gt;();
  </code></pre>
  
  <p>I have code that attempts to remove ArrayLists that are less than a certain size from the collection. </p>
  
  <p>However all it seems to do is half the list and doesn't remove the correct ArrayLists from the collection.</p>
  
  <p>Please see my code below: </p>
  
  <pre><code>for (int loop = 0 ;   loop &lt;  EventsCollect.size(); loop++) {
      if ( EventsCollect.get(loop).size() &lt;  200000) {
           EventsCollect.remove(loop);
      }
  }
  </code></pre>
  
  <p>After doing this, ArrayLists remain in the collection that are only triple figures in size.</p>
  
  <p>Any advice about how to correct this would be greatly appreciated.</p>