• Post Reply Bookmark Topic Watch Topic
  • New Topic

Replacing HashMap with LinkedHashMap  RSS feed

 
lubna kausar
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
we have an exsting system which uses Hashmap to store some objects.
Now as the order is not maintained and the size of the maps increases it leads to performance issues as after retriving the objects we need to reorder it.

We are thinking to replace HashMap with LinkedHashMap.
To be on safe side I want to know can there be any other implecations (external implecations like methid name difference or something like that).

I can not think about any such difference but need expert openion before moving further.

Thanks Ranchers
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should go very smoothly. They have the same API and work the same way. The only difference is the retrieval order, and since that's arbitrary in HashMap, you shouldn't be depending on it yet.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!