在java中维护插入Order的地图(集合) [英] Maps (collection) that maintains insertion Order in java
本文介绍了在java中维护插入Order的地图(集合)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要在Android中使用Java中的地图。但问题是列表自动排序。如何使用Google地图以与插入数据相同的顺序获取数据。
I need to use Maps in Java for an Android Application. But the problem is that the list gets sorted automatically. How do I use Maps to get the data in the same order as I have inserted data.
推荐答案
$ c> LinkedHashMap 。请访问 Android文档和 Java文档了解详情。
You should use LinkedHashMap
for this purpose..Visit Android Docs and Java Docs for more details.
这篇关于在java中维护插入Order的地图(集合)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文