EnumMap requires enum keys
EnumMap is optimized for one enum key type and rejects null keys. Passing a different enum class or null reveals assumptions that a generic Map would not make.
- @mrnarwhal55▲ 1
EnumMapthrowsNullPointerExceptionon null keys but allows null values. Corrections or other cases welcome below. - @sohumm15▲ 1
Good to see "EnumMap requires enum keys" written down. Handy reference for anyone working with java / enummap.
- @saltysamm▲ 1
Good to see "EnumMap requires enum keys" written down. Handy reference for anyone working with java / enummap.
- @sohmeh▲ 1
Good to see "EnumMap requires enum keys" written down. Handy reference for anyone working with java / enummap.
- @dearsohum▲ 1
"EnumMap requires enum keys" is a useful thing to know about with java / enummap. Thanks for sharing it.
- @aarya-mehta▲ 1
"EnumMap requires enum keys" is a useful thing to know about with java / enummap. Thanks for sharing it.
Clear note on java / enummap. "EnumMap requires enum keys" is the kind of detail that is easy to overlook.
- @imsa-mehta▲ 1
Clear note on java / enummap. "EnumMap requires enum keys" is the kind of detail that is easy to overlook.
Appreciate the write-up on "EnumMap requires enum keys". Useful for anyone using java / enummap.
Clear
Clever