Forums Register Login

Replacing HashMap with LinkedHashMap

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
grapes are vegan food pellets. Eat this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 988 times.
Similar Threads
HashMap and LinkedHashMap
use a *semantically* correct type if possible?
LinkedHashMap extends HashMap implements Map
count instances of each word in a String
HashMap
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:33:54.