You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I've looked for, LinkedHashMap is more faster than HashMap in some features. ref
Have you decided to use LinkedHashMap simply for the above reasons?
I think, It seems good to use HashMap if ordering is not needed.
Using LinkedHashMap seems to have something to do with the order. It can cause misunderstanding.
What do you think about this?
Thanks.
The text was updated successfully, but these errors were encountered:
fmbenhassine
changed the title
Why Spring batch JobParameters using LinkedHashMap
JobParameters should use LinkedHashMap instead of HashMap
May 17, 2023
from Stackoverflow
Hi there,
Compared to
HashMap
,LinkedHashMap
guarantees input order.In Spring Batch, I think
HashMap
is enough to saveJobParameter
, but I don't know whyJobParameters
usedLinkedHashMap
. What do you think about this?Below are some of the implementations of
JobParameters
. Github LinkFrom what I've looked for,
LinkedHashMap
is more faster thanHashMap
in some features. refHave you decided to use
LinkedHashMap
simply for the above reasons?I think, It seems good to use
HashMap
if ordering is not needed.Using
LinkedHashMap
seems to have something to do with the order. It can cause misunderstanding.What do you think about this?
Thanks.
The text was updated successfully, but these errors were encountered: