code: @Override
      public void setCurrency(Currency theCurrency) {
          // If we are a currency format, then modify our affixes to
          // encode the currency symbol for the given currency in our
          // locale, and adjust the decimal digits and rounding for the
          // given currency.
  
          super.setCurrency(theCurrency);
          if (theCurrency != null) {
              String s = theCurrency.getName(symbols.getULocale(), Currency.SYMBOL_NAME, null);
              symbols.setCurrency(theCurrency);
              symbols.setCurrencySymbol(s);
          }
  
          if (currencySignCount != CURRENCY_SIGN_COUNT_ZERO) {
              if (theCurrency != null) {
                  setRoundingIncrement(theCurrency.getRoundingIncrement(currencyUsage));
                  int d = theCurrency.getDefaultFractionDigits(currencyUsage);
                  setMinimumFractionDigits(d);
                  setMaximumFractionDigits(d);
              }
              if (currencySignCount != CURRENCY_SIGN_COUNT_IN_PLURAL_FORMAT) {
                  // This is not necessary for plural format type
                  // because affixes will be resolved in subformat
                  expandAffixes(null);
              }
          }
      }
docs: Sets the <tt>Currency</tt> object used to display currency amounts. This takes
  effect immediately, if this format is a currency format. If this format is not a
  currency format, then the currency object is used if and when this object becomes a
  currency format through the application of a new pattern.
  
  @param theCurrency new currency object to use. Must not be null.