我正在开发一个Android项目,其中我必须从散列表中获取所有值,而不管密钥如何。我的地图是获取散列表中的所有值
HashMap<String, ArrayList<MyProduct>> orderAdap = InvocieProductFragment.mapOrderd;
而从这个地图我根据产品名称加载培训相关产品的ArrayList。
ArrayList<MyProduct> lstStyle = orderAdap.get(lstBrandCode.get(position));
但我的问题是,我可以加载所有的产品清单到一个单一的ArrayList没有在这个哈希映射有关键值。
例如想象我的哈希映射是这样的。
[ss,[p1,p2,p3]],[we,[p3,p4]],[rf,[p1,p4,p5,p7,p9]]
,我需要输出作为
[p1,p2,p3,p3,p4,p1,p4,p5,p7,p9]
可以这样做。需要帮忙。谢谢.....
可能重复[从地图列表值(http://stackoverflow.com/questions/13679427/get-value-from-map-list) –