aspose file tools*
The moose likes Java in General and the fly likes What is a data structure for Map that preserves insert order? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "What is a data structure for Map that preserves insert order?" Watch "What is a data structure for Map that preserves insert order?" New topic
Author

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

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
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

Joined: Jan 10, 2002
Posts: 61180
    
  66

LinkedHashMap


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is a data structure for Map that preserves insert order?