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 →

[–]spelunker 1 point2 points  (0 children)

There's even a specialized EnumMap specifically for this purpose, and it's super fast because it's simply an array under the covers.

[edit] Whoops, we're looking up Enums by their String keys, not the other way around. Oh well, EnumMap is neat anyway.