dsmiley commented on PR #2932: URL: https://github.com/apache/solr/pull/2932#issuecomment-2572254142
NamedList and thus SimpleOrderedMap is ordered (insertion order). HashMap is called HashMap because it explains its implementation via use of the hashCode() and thus get(key) is `O(1)`. NamedList and thus SimpleOrderedMap doesn't use a hashCode so I would say it's *not* specifically like a HashMap but I would indeed say that SimpleOrderedMap is a Map even though it doesn't implement the interface. It has Map in its name, after all. I recall there was concern that implementing Map would lead to people passing this off to code that makes assumptions on Map having better than `O(N)` lookup by key (even TreeMap is `O(Log N)`) but NamedList is `O(N)` leading to a performance problem for non-trivial sized NamedLists. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
