ExtractStreamMapAction: made stream-agnostic (with ability to extend to other chaining lambda APIs like Guava, RxJava, etc.); implemented for CompletableFuture; existing lambda is always preserved now.

This commit is contained in:
Tagir Valeev
2017-03-06 13:47:38 +07:00
parent bd3c0ddfba
commit 504a5727d6
43 changed files with 444 additions and 232 deletions

View File

@@ -1,9 +1,9 @@
// "Extract variable 'y' to separate stream step" "true"
// "Extract variable 'y' to separate mapping method" "true"
import java.util.*;
import java.util.stream.*;
public class Test {
void testFlatMap() {
Stream.of("xyz").mapToInt(String::length).flatMap(y -> IntStream.range(0, y)).forEach(System.out::println);
Stream.of("xyz").mapToInt(String::length).flatMap(y -> IntStream.range(0, y)).forEach(System.out::println);
}
}