title: Get index in lambda foreach expression java 8
body: <p>I want to remove objects from the list on a certain filter and there are more than one objects.</p>
  
  <pre><code>list.stream().filter(g-&gt;g.getName().equalsIgnoreCase("String")).forEach(result -&gt;{
  
              /* is it possible to get the index of the result here?
              .remove(), will iterate through the list again. I don't want that.
              */
  
              list.remove(result);
  });
  </code></pre>