| 程序包 | 说明 |
|---|---|
| cn.hutool.core.collection |
集合以及Iterator封装,包括集合工具CollUtil,Iterator和Iterable工具IterUtil
|
| 限定符和类型 | 方法和说明 |
|---|---|
static <K,V> void |
CollUtil.forEach(Map<K,V> map,
CollUtil.KVConsumer<K,V> kvConsumer)
循环遍历Map,使用
CollUtil.KVConsumer 接受遍历的每条数据,并针对每条数据做处理和JDK8中的map.forEach不同的是,此方法支持index |
static <K,V> void |
CollUtil.forEach(Map<K,V> map,
CollUtil.KVConsumer<K,V> kvConsumer)
循环遍历Map,使用
CollUtil.KVConsumer 接受遍历的每条数据,并针对每条数据做处理和JDK8中的map.forEach不同的是,此方法支持index |
Copyright © 2022. All rights reserved.