Reputation: 173
How can elements of a stream be removed to generate another stream. I wish to have a filter on a stream, and for each element passing that filter, I want to delete that element from the stream.
Upvotes: 1
Views: 97
Reputation: 3992
Use the filter-method from Java Streams.