mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
15 lines
278 B
Java
15 lines
278 B
Java
// "Replace with forEach" "true"
|
|
import java.util.*;
|
|
|
|
public class Collect {
|
|
class Person {
|
|
String getName() {
|
|
return "";
|
|
}
|
|
}
|
|
|
|
void collectNames(List<Person> persons, Set<String> names){
|
|
persons.stream().map(Person::getName).forEach(names::add);
|
|
}
|
|
}
|