title: Java 8 lambda get and remove element from list
body: <p>Given a list of elements, I want to get the element with a given property <strong>and</strong> remove it from the list. The best solution I found is:</p>
  
  <pre><code>ProducerDTO p = producersProcedureActive
                  .stream()
                  .filter(producer -&gt; producer.getPod().equals(pod))
                  .findFirst()
                  .get();
  producersProcedureActive.remove(p);
  </code></pre>
  
  <p>Is it possible to combine get and remove in a lambda expression?</p>