Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CollectionsUtils {
- public static void remove(List<?> items, Filter<Object> filter) {
- Iterator<?> iterator = items.iterator();
- while (iterator.hasNext()) {
- if (filter.shouldRemove(iterator.next())) {
- iterator.remove();
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement