Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/collect/afterCollectBoxed.java
2022-12-23 13:26:29 +00:00

11 lines
387 B
Java

// "Collapse loop with stream 'collect()'" "true-preview"
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
public class Main {
public void testPrimitiveMap(List<String> data) {
List<Integer> list = data.stream().filter(str -> str.startsWith("xyz")).mapToInt(String::length).filter(len -> len > 10).boxed().collect(Collectors.toList());
}
}