- Apache Spark 2.x for Java Developers
- Sourav Gulati Sumit Kumar
- 45字
- 2021-07-02 19:01:59
Groupings
The elements of streams can also be grouped using Collectors, returning a map, such that for a key of type T, the Collector generates a Map<T,List<Y>>:
//Grouping Collectors
Map<Integer,List<String>>groupExample= streamSupplier.get().collect(Collectors.groupingBy(x-> x.toString().length()));
System.out.println("Grouping stream elements on the basis of its length :: " + groupExample);
推薦閱讀
- Software Defined Networking with OpenFlow
- Debian 7:System Administration Best Practices
- C/C++算法從菜鳥到達人
- Android Application Development Cookbook(Second Edition)
- GameMaker Programming By Example
- 小程序開發原理與實戰
- HTML 5與CSS 3權威指南(第3版·上冊)
- LabVIEW虛擬儀器程序設計從入門到精通(第二版)
- Go語言入門經典
- Oracle 12c從入門到精通(視頻教學超值版)
- Python硬件編程實戰
- Apache Solr for Indexing Data
- 可視化H5頁面設計與制作:Mugeda標準教程
- Visual C#(學習筆記)
- C++從零開始學(視頻教學版)(第2版)