mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 02:38:59 +07:00
15 lines
360 B
Java
15 lines
360 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){
|
|
Iterator<Person> it = toRemove.iterator();
|
|
while (it.hasNext()) {
|
|
Person person = it.next();
|
|
persons<caret>.remove(person);
|
|
}
|
|
}
|
|
}
|