mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
21 lines
420 B
Java
21 lines
420 B
Java
// "Replace with collect" "false"
|
|
import java.util.*;
|
|
|
|
public class Collect {
|
|
class Person {
|
|
String getName() {
|
|
return "";
|
|
}
|
|
}
|
|
|
|
void collectNames(List<Person> persons){
|
|
final Set<String> names = new HashSet<>(), other = new HashSet<>();
|
|
if(persons != null) {
|
|
for (Person person : pers<caret>ons) {
|
|
names.add(person.getName());
|
|
}
|
|
}
|
|
System.out.println(names);
|
|
}
|
|
}
|