Created
September 6, 2017 23:59
-
-
Save gabfssilva/bc1395b03b4d8508c07dad8e37edaf5f to your computer and use it in GitHub Desktop.
parallelStream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stream<Integer> xs = Stream.of(5, 3, 7, 3, 2, 7); | |
final List<Integer> range = IntStream.range(0, 100).boxed().collect(toList()); | |
final List<List<Integer>> result = | |
range | |
.parallelStream() | |
.map(e -> xs.sorted().collect(toList())) | |
.collect(toList()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment