Use EnumSet instead of HashSet.