public static CurrencyUnit registerCurrencyUnit(CurrencyUnit currencyUnit) {
        Objects.requireNonNull(currencyUnit);
        return ConfigurableCurrencyUnitProvider.currencyUnits.put(currencyUnit.getCurrencyCode(), currencyUnit);
    }
public static CurrencyUnit registerCurrencyUnit ( CurrencyUnit currencyUnit ) { Objects . requireNonNull ( currencyUnit ) ; return ConfigurableCurrencyUnitProvider . currencyUnits . put ( currencyUnit . getCurrencyCode ( ) , currencyUnit ) ; }
Registers a bew currency unit under its currency code.

@param currencyUnit the new currency to be registered, not null.
@return any unit instance registered previously by this instance, or null.