mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-28 23:50:57 +07:00
12 lines
327 B
Java
12 lines
327 B
Java
// "Extract variable 's' to 'mapToObj' operation" "true-preview"
|
|
import java.util.*;
|
|
import java.util.stream.*;
|
|
|
|
public class Test {
|
|
void testFlatMap() {
|
|
IntStream.of(1, 2, 3).flatMap(x -> {
|
|
String <caret>s = String.valueOf(x);
|
|
return IntStream.range(0, s.length());
|
|
}).forEach(System.out::println);
|
|
}
|
|
} |