If you need a Set of enum values, then it's strongly recommended that you use an EnumSet. According to
Guide to EnumSet:
That tutorial wrote:As a rule of thumb, EnumSet should always be preferred over any other Set implementation when we are storing enum values.
If you do that, then line 11 becomes, well as the tutorial says:
we can create an EnumSet by copying all the elements from another EnumSet