网页学习体会

  • 首页
  • 个人博客
您的位置: 首页  >  IT文章  >  Map集合遍历

Map集合遍历

分类: IT文章 • 2024-09-16 09:12:31

1.遍历key-Value

ConcurrentHashMap<String, Object> map= new ConcurrentHashMap<String, Object>();//Object替换为结构类

for(String key :map.keySet()){
    Object object= map.get(key);
}

2.遍历Value

ConcurrentHashMap<String, Object> map= new ConcurrentHashMap<String, Object>();//Object替换为结构类

Iterator<Entry<String, Object>> it = map.entrySet().iterator();
while (it.hasNext()) {
    Entry<String, Object> entry = (Entry<String, Object>) it.next();
    Object object= entry.getValue();
}

相关推荐

  • C++中的unordered_map
  • windows下《七天学会NodeJS》学习笔记之三--文件操作 小文件拷贝 大文件拷贝 Buffer(数据块)http://nodejs.org/api/buffer.html Stream(数据流)[http://nodejs.org/api/stream.html) File System(文件系统)[http://nodejs.org/api/fs.html) Path(路径)[http://nodejs.org/api/path.html) 遍历目录 文本编码
  • filter_map
  • 遍历内存中的缓存
  • 解决 Page 'http://localhost:63342/v3/js/math/math.map' requested without authorization页面未授权问题 解决 Page 'http://localhost:63342/v3/js/math/math.map' requested without authorization页面未授权问题
  • 关于Array.prototype.map 的 polyfill 函数中使用>>>的疑问,以及改进方法?
  • 集合 set
  • 遍历实例化swiper
  • Option Map2
  • Either Map2Ext
  • java基本数据类型
  • 暂时解决Sublime Text 2不支持input问题(转)
    网站免责声明 网站地图 最新文章 用户隐私 版权申明
本站所有数据收集于网络,如果侵犯到您的权益,请联系网站进行下架处理。   

Copyright © 2018-2021   Powered By 网页学习体会    备案号:   粤ICP备20002247号