Replace EnumSet with Set interface in API.