mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
14 lines
293 B
Java
14 lines
293 B
Java
// "Replace iteration with bulk 'Collection.addAll()' call" "true-preview"
|
|
import java.util.*;
|
|
|
|
public class Collect {
|
|
class Person {}
|
|
|
|
void collectNames(List<Person> persons){
|
|
List<Person> names = new ArrayList<>();
|
|
persons.forEach(p -> {
|
|
names<caret>.add(p);
|
|
});
|
|
}
|
|
}
|