I have the following example:
import java.util.EnumSet;
import java.util.Iterator;
public class SizeSet {
public static void main(String[] args) {
An EnumSet is a specialized Set collection to work with enum classes. It implements the Set interface and extends from AbstractSet:
When you plan to use an EnumSet youhave to take into consideration some points:
Now, the EnumSet largeSize part is a variable declaration so yes, it's of type EnumSet. Please notice that you can add the type of elements in the collection for better type safety: EnumSet
Check out this article to learn more about EnumSet.