Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/beforeCollectHashSet.java
2014-03-03 13:43:43 +01:00

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());
}
}
}