如何使用Stream
groupingBy
Java 8 的表达式操作来完成这个?
我想转一个Set<String> allTextFileList
包含:
20150101_00b667339f32fcff37db6e89aea53065.txt
20150101_06d0e76e4782cff3ce455feecf72b80d.txt
20150301_11f706c03860068e7e736ff943525504.txt
20150301_33719f3b98081b32e9ffd3b932e1902d.txt
到一个Map<String, Set<String>> textFileListBydate
包含
20150101 ->
- 20150101_00b667339f32fcff37db6e89aea53065.txt
- 20150101_06d0e76e4782cff3ce455feecf72b80d.txt
20150301 ->
- 20150301_11f706c03860068e7e736ff943525504.txt
- 20150301_33719f3b98081b32e9ffd3b932e1902d.txt