Core Java SE 9 for the Impatient by Cay S. Horstmann

Core Java SE 9 for the Impatient by Cay S. Horstmann

Author:Cay S. Horstmann
Language: eng
Format: epub, pdf
Publisher: Pearson Education
Published: 2018-11-06T05:00:00+00:00


* * *

Note

If you call the groupingByConcurrent method, you get a concurrent map that, when used with a parallel stream, is concurrently populated. This is entirely analogous to the toConcurrentMap method.

* * *

8.11 Downstream Collectors

The groupingBy method yields a map whose values are lists. If you want to process those lists in some way, supply a downstream collector. For example, if you want sets instead of lists, you can use the Collectors.toSet collector that you saw in the preceding section:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.