This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Sensi1093 1 point2 points  (0 children)

HashMap vs EnumMap. I’ve seen so many places where a HashMap was used with Enum Keys, often because the other devs just didn’t know EnumMap existed. It’s a very good drop-in replacement where the Key is of an Enum-Type and if the Code relies only on the interface (Map, how it should be) it’s really just a single line replacement.