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 committed 2017-03-06 15:32:16 +07:00
1 parent bd3c0ddfba
commit 504a5727d6
43 files changed
+444 -232

No files matched your search

@@ -1,9 +1,9 @@
// "Extract variable 'set' to separate stream step" "true"
// "Extract variable 'set' to separate mapping method" "true"
import java.util.*;
import java.util.stream.*;
public class Test {
void testMap(List<Map<String, String>> list) {
list.stream().map(Map::keySet).flatMap(set -> set.stream()).forEach(System.out::println);
list.stream().map(Map::keySet).flatMap(set -> set.stream()).forEach(System.out::println);
}
}