mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-02 05:50:53 +07:00
12 lines
308 B
Java
12 lines
308 B
Java
// "Extract variable 'y' to 'mapToInt' operation" "true-preview"
|
|
import java.util.*;
|
|
import java.util.stream.*;
|
|
|
|
public class Test {
|
|
void testFlatMap() {
|
|
Stream.of("xyz").flatMapToInt(x -> {
|
|
int <caret>y = x.length();
|
|
return IntStream.range(0, y);
|
|
}).forEach(System.out::println);
|
|
}
|
|
} |