- 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);
推薦閱讀
- 黑客攻防從入門到精通(實戰秘笈版)
- Learn ECMAScript(Second Edition)
- Python編程自學手冊
- Getting Started with Gulp(Second Edition)
- PWA入門與實踐
- Learning Informatica PowerCenter 10.x(Second Edition)
- PHP網絡編程學習筆記
- The DevOps 2.4 Toolkit
- Julia高性能科學計算(第2版)
- PHP+MySQL+Dreamweaver動態網站開發從入門到精通(第3版)
- Mastering Web Application Development with AngularJS
- Hands-On GUI Programming with C++ and Qt5
- JavaScript+jQuery網頁特效設計任務驅動教程
- 零基礎學Scratch 3.0編程
- 程序員的成長課