1482| 9
|
[求助] List<Map<String, Object>>集合中有几十万条数据,每100条为一组取出 |
发表于 2021-8-17 10:26
25吾爱币
最佳答案[mw_shl_code=java,true] public static Map groupList(List list, int toIndex) {
if (list == null || list.isEmpty() || toIndex < 1) {
return new HashMap();
}
Map result = new HashMap();
int size = list.size();
int count = (size + toIndex - 1) / toIndex;
for (int i = 0; i < count; i++) {
List subList = list.subLis ...
| ||
发帖前要善用【论坛搜索】功能,那里可能会有你要找的答案或者已经有人发布过相同内容了,请勿重复发帖。 |
||
发表于 2021-8-17 10:26
| ||
发表于 2021-8-17 10:34
| ||
|
发表于 2021-8-17 10:37
| ||
发表于 2021-8-17 10:39
| ||
|
发表于 2021-8-17 11:01
| ||
|
发表于 2021-8-17 11:06
| ||
RSS订阅|小黑屋|处罚记录|联系我们|吾爱破解 - LCG - LSG ( 京ICP备16042023号 | 京公网安备 11010502030087号 )
GMT+8, 2024-6-6 17:04
Powered by Discuz!
Copyright © 2001-2020, Tencent Cloud.