/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { Locale } from "../../types/java/util/Locale"; import type { Currency } from "../../types/senselogic/sitevision/api/i18n/Currency"; import type { String } from "../../types/java/lang/String"; /** * Factory for creating Currency instances. * *

* An instance of the Sitevision class implementing this interface can be obtained via * {@link senselogic.sitevision.api.Utils#getCurrencyFactory()}. * See {@link senselogic.sitevision.api.Utils} for how to obtain an instance of the Utils interface. *

* @author Magnus Lövgren * @since Sitevision 6.1 */ export interface CurrencyFactory { /** * Gets the Currency instance for a given locale. * *

* Important Country Note! A Locale without a country can never have a Currency! * This method will always return null for such Locale. *

*

* Tip! {@link senselogic.sitevision.api.i18n.LocaleUtil#resolveCountryLocale(Locale)} might be helpful in order to * compensate for language-only locales. *

* *

* This method is conceptually equivalent with the java.util.Currency.getInstance(Locale) method. *

* @param aLocale the Locale * @return the Currency for aLocale, or null if aLocale is null or no Currency can be determined for aLocale * @see senselogic.sitevision.api.i18n.LocaleUtil#resolveCountryLocale(Locale) */ fromLocale(aLocale: Locale): Currency; /** * Gets the Currency instance for a given ISO 4217 Currency Code. * *

* * Currency codes are specified with a three-letter alphabetic code specified by ISO 4217 * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * *
Common currencies
Currency nameCurrency code
US DollarUSD
EuroEUR
Brittish PoundGBP
Swedish KronaSEK
Norwegian KroneNOK
* *

* This method is conceptually equivalent with the java.util.Currency.getInstance(String) method. *

* @param aCurrencyCode a ISO 4217 currency code * @return a Currency for aCurrencyCode, or null if aCurrencyCode is null or invalid */ fromCurrencyCode(aCurrencyCode: String | string): Currency; } declare namespace CurrencyFactory {} declare var currencyFactory: CurrencyFactory; export default currencyFactory;