title: Removing an item from a stack, whilst iterating over it, in android
body: <p>Usually, in java, to delete an item from a stack (or set) I would do something along the lines of:</p>
  
  <pre><code>Stack&lt;Particle&gt; particles = new Stack&lt;Particle&gt;();
  int i = 0, ;
  while(i &lt; particles.size()) {
      if(particles.elementAt(i).isAlive()) {
          i ++;
      } else {
          particles.remove(i);
      }
  }
  </code></pre>
  
  <p>I've searched the android docs and googled quite a few times in an attempt to achieve the same results, but nothing seems to work. Can anyone help me here?</p>