title: How to perform an operation on every item in java.util.Set using stream/ifPresent?
body: <p>I have a question about streams/optionals.</p>
  
  <p>I want to perform an delete operation on a set of items fetched in a query:</p>
  
  <pre><code>providerRepository.findByUserId(user.getId()).ifPresent(providerRepository::delete);
  </code></pre>
  
  <p>But my IDE says:</p>
  
  <pre><code>Incompatible types: Set&lt;AuthenticationProvider&gt; is not convertible to AuthenticationProvider
  </code></pre>
  
  <p>How do I perform an operation on every single item in a collection?</p>