Change the EnumSet equivalent of "A &= ~ new(~B)" to "A &= B". This eliminates the need for one temporary object in a frequently called loop, and reduces the number of methods that need to be invoked.