The EnumSet Class in java
EnumSet extends AbstractSet and implements Set. It is specifically for use with keys of an enum type. It is a generic class that has this declaration: Here, E specifies the elements. Notice that E must extend Enum, which enforces the requirement that the elements must be of the specified enum type. The Methods Defined by … Read more