| Author |
Replacing HashMap with LinkedHashMap
|
lubna kausar
Ranch Hand
Joined: May 06, 2006
Posts: 51
|
|
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
Marshal
Joined: Jul 08, 2003
Posts: 24061
|
|
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.
|
[Jess in Action][AskingGoodQuestions]
|
 |
 |
|
|
subject: Replacing HashMap with LinkedHashMap
|
|
|