EnumSet and EnumMap
TechEmpower
FEBRUARY 14, 2017
from Java's standard libraries. Historically, Enum{Set,Map} were recommended as a matter of safety, taking better advantage of Java's type system than the alternatives. Effective Java goes into detail about this use case for Enum{Set,Map} and enum types in general. Some developers don't know these classes exist.
Let's personalize your content