mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
12 lines
318 B
Java
12 lines
318 B
Java
// "Replace iteration with bulk 'List.removeAll' call" "true"
|
|
import java.util.*;
|
|
|
|
public class Collect {
|
|
static class Person {}
|
|
|
|
void collectNames(List<Person> persons, Collection<Person> toRemove){
|
|
for (Iterator<Person> it = toRemove.iterator(); it.hasNext(); )
|
|
persons<caret>.remove(it.next());
|
|
}
|
|
}
|