• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is a data structure for Map that preserves insert order?

 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using Java 1.6. Is there a data structure similar to Map (or implementation of Map) that will preserve the order in which I insert elements via

map.put(key1,value1)
map.put(key2,value2);
map.put(key3,value3)

? Ultimately I am looking to get back a list of Map.Entry<Object, Object> objects from the aforementioned data structure.

Thanks, - Dave
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic