mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
18 lines
319 B
Java
18 lines
319 B
Java
// "Replace with collect" "true"
|
|
import java.util.*;
|
|
|
|
public class Collect {
|
|
class Person {
|
|
String getName() {
|
|
return "";
|
|
}
|
|
}
|
|
|
|
void collectNames(List<Person> persons){
|
|
Set<String> names = new HashSet<>();
|
|
for (Person person : pers<caret>ons) {
|
|
names.add(person.getName());
|
|
}
|
|
}
|
|
}
|