August 2018
Intermediate to advanced
524 pages
14h 45m
English
EnumSet can contain elements from a certain enumeration. Recall that enumerations are classes that have fixed a number of instances declared inside the enum itself. As this limits the number of the different object instances, and this number is known during compilation time, the implementation of the EnumSet code is fairly optimized. Internally, EnumSet is implemented as a bit field and is a good choice where bit field manipulations would be the choice were we programming in a low-level language.