blob: 676c127d4a6f95d146d3fc99f7f57f729407e225 [file] [log] [blame]
// "Replace with collect" "true"
import java.util.*;
import java.util.stream.Collectors;
public abstract class Collect implements Collection<String>{
class Person {
String getName() {
return "";
}
}
void collectNames(List<Person> persons){
addAll(persons.stream().map(Person::getName).collect(Collectors.toList()));
}
}