Package com.ibm.icu.text
Class CurrencyMetaInfo
- java.lang.Object
-
- com.ibm.icu.text.CurrencyMetaInfo
-
public class CurrencyMetaInfo extends Object
Provides information about currencies that is not specific to a locale. A note about currency dates. The CLDR data provides data to the day, inclusive. The date information used by CurrencyInfo and CurrencyFilter is represented by milliseconds, which is overly precise. These times are in GMT, so queries involving dates should use GMT times, but more generally you should avoid relying on time of day in queries. This class is not intended for public subclassing.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CurrencyMetaInfo.CurrencyDigits
Represents the raw information about fraction digits and rounding increment.static class
CurrencyMetaInfo.CurrencyFilter
A filter used to select which currency info is returned.static class
CurrencyMetaInfo.CurrencyInfo
Represents a complete currency info record listing the region, currency, from and to dates, and priority.
-
Field Summary
Fields Modifier and Type Field Description protected static CurrencyMetaInfo.CurrencyDigits
defaultDigits
Deprecated.This API is ICU internal only.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CurrencyMetaInfo()
Deprecated.This API is ICU internal only.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<String>
currencies(CurrencyMetaInfo.CurrencyFilter filter)
Returns the list of currency codes matching the provided filter.CurrencyMetaInfo.CurrencyDigits
currencyDigits(String isoCode)
Returns the CurrencyDigits for the currency code.CurrencyMetaInfo.CurrencyDigits
currencyDigits(String isoCode, Currency.CurrencyUsage currencyUsage)
Returns the CurrencyDigits for the currency code with Context Usage.List<CurrencyMetaInfo.CurrencyInfo>
currencyInfo(CurrencyMetaInfo.CurrencyFilter filter)
Returns the list of CurrencyInfos matching the provided filter.static CurrencyMetaInfo
getInstance()
Returns the unique instance of the currency meta info.static CurrencyMetaInfo
getInstance(boolean noSubstitute)
Returns the unique instance of the currency meta info, or null if noSubstitute is true and there is no data to support this API.static boolean
hasData()
Deprecated.This API is ICU internal only.List<String>
regions(CurrencyMetaInfo.CurrencyFilter filter)
Returns the list of region codes matching the provided filter.
-
-
-
Field Detail
-
defaultDigits
@Deprecated protected static final CurrencyMetaInfo.CurrencyDigits defaultDigits
Deprecated.This API is ICU internal only.
-
-
Constructor Detail
-
CurrencyMetaInfo
@Deprecated protected CurrencyMetaInfo()
Deprecated.This API is ICU internal only.Subclass constructor.
-
-
Method Detail
-
getInstance
public static CurrencyMetaInfo getInstance()
Returns the unique instance of the currency meta info.- Returns:
- the meta info
-
getInstance
public static CurrencyMetaInfo getInstance(boolean noSubstitute)
Returns the unique instance of the currency meta info, or null if noSubstitute is true and there is no data to support this API.- Parameters:
noSubstitute
- true if no substitute data should be used- Returns:
- the meta info, or null
-
hasData
@Deprecated public static boolean hasData()
Deprecated.This API is ICU internal only.Returns true if there is data for the currency meta info.- Returns:
- true if there is actual data
-
currencyInfo
public List<CurrencyMetaInfo.CurrencyInfo> currencyInfo(CurrencyMetaInfo.CurrencyFilter filter)
Returns the list of CurrencyInfos matching the provided filter. Results are ordered by country code, then by highest to lowest priority (0 is highest). The returned list is unmodifiable.- Parameters:
filter
- the filter to control which currency info to return- Returns:
- the matching information
-
currencies
public List<String> currencies(CurrencyMetaInfo.CurrencyFilter filter)
Returns the list of currency codes matching the provided filter. Results are ordered as incurrencyInfo(CurrencyFilter)
. The returned list is unmodifiable.- Parameters:
filter
- the filter to control which currencies to return. If filter is null, returns all currencies for which information is available.- Returns:
- the matching currency codes
-
regions
public List<String> regions(CurrencyMetaInfo.CurrencyFilter filter)
Returns the list of region codes matching the provided filter. Results are ordered as incurrencyInfo(CurrencyFilter)
. The returned list is unmodifiable.- Parameters:
filter
- the filter to control which regions to return. If filter is null, returns all regions for which information is available.- Returns:
- the matching region codes
-
currencyDigits
public CurrencyMetaInfo.CurrencyDigits currencyDigits(String isoCode)
Returns the CurrencyDigits for the currency code. This is equivalent to currencyDigits(isoCode, CurrencyUsage.STANDARD);- Parameters:
isoCode
- the currency code- Returns:
- the CurrencyDigits
-
currencyDigits
public CurrencyMetaInfo.CurrencyDigits currencyDigits(String isoCode, Currency.CurrencyUsage currencyUsage)
Returns the CurrencyDigits for the currency code with Context Usage.- Parameters:
isoCode
- the currency codecurrencyUsage
- the currency usage- Returns:
- the CurrencyDigits
-
-