Java EnumSet class implements Set and uses it with enum types. EnumSet (as the name suggests) can contain only enum values and all the values belong to the same enum. In addition, EnumSet does not permit null values which means it throws a NullPointerException in attempt to add null values. It is not thread-safe which means if required,…
Continue reading