Top Description Inners Fields Constructors Methods
com.ibm.icu.text

public Class CurrencyMetaInfo

extends Object
Class Inheritance
Known Direct Subclasses
com.ibm.icu.impl.ICUCurrencyMetaInfo
Imports
java.lang.reflect.Field, java.util.Collections, .Date, .List, com.ibm.icu.impl.Grego, .Utility, com.ibm.icu.util.Currency.CurrencyUsage

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.
ICU Status
Stable since ICU 4.4.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
CurrencyMetaInfo.CurrencyDigits

Represents the raw information about fraction digits and rounding increment.

public static class
CurrencyMetaInfo.CurrencyFilter

A filter used to select which currency info is returned.

public static class
CurrencyMetaInfo.CurrencyInfo

Represents a complete currency info record listing the region, currency, from and to dates, and priority.

Field Summary

Modifier and TypeField and Description
protected static final CurrencyMetaInfo.CurrencyDigits
defaultDigits

Deprecated This API is ICU internal only.
private static final boolean
private static final CurrencyMetaInfo

Constructor Summary

AccessConstructor and Description
protected
CurrencyMetaInfo()

Deprecated This API is ICU internal only.
Subclass constructor.

Method Summary

Modifier and TypeMethod and Description
public List<String>

Returns:

the matching currency codes
currencies
(CurrencyMetaInfo.CurrencyFilter
the filter to control which currencies to return. If filter is null, returns all currencies for which information is available.
filter
)

Returns the list of currency codes matching the provided filter.

public CurrencyMetaInfo.CurrencyDigits

Returns:

the CurrencyDigits
currencyDigits
(String
the currency code
isoCode
)

Returns the CurrencyDigits for the currency code.

public CurrencyMetaInfo.CurrencyDigits

Returns:

the CurrencyDigits
currencyDigits
(String
the currency code
isoCode
,
Currency.CurrencyUsage
the currency usage
currencyUsage
)

Returns the CurrencyDigits for the currency code with Context Usage.

public List<CurrencyMetaInfo.CurrencyInfo>

Returns:

the matching information
currencyInfo
(CurrencyMetaInfo.CurrencyFilter
the filter to control which currency info to return
filter
)

Returns the list of CurrencyInfos matching the provided filter.

private static String
dateString(long date)

private static String
public static CurrencyMetaInfo

Returns:

the meta info
getInstance
()

Returns the unique instance of the currency meta info.

public static CurrencyMetaInfo

Returns:

the meta info, or null
getInstance
(boolean
true if no substitute data should be used
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.

public static boolean

Returns:

true if there is actual data
hasData
()

Deprecated This API is ICU internal only.
Returns true if there is data for the currency meta info.
public List<String>

Returns:

the matching region codes
regions
(CurrencyMetaInfo.CurrencyFilter
the filter to control which regions to return. If filter is null, returns all regions for which information is available.
filter
)

Returns the list of region codes matching the provided filter.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultDigitsback to summary
protected static final CurrencyMetaInfo.CurrencyDigits defaultDigits

Deprecated

This API is ICU internal only.

Annotations
@Deprecated
ICU Status
Internal ICU component.
hasDataback to summary
private static final boolean hasData
implback to summary
private static final CurrencyMetaInfo impl

Constructor Detail

CurrencyMetaInfoback to summary
protected CurrencyMetaInfo()

Deprecated

This API is ICU internal only.

Subclass constructor.

Annotations
@Deprecated
ICU Status
Internal ICU component.

Method Detail

currenciesback to summary
public List<String> currencies(CurrencyMetaInfo.CurrencyFilter filter)

Returns the list of currency codes matching the provided filter. Results are ordered as in currencyInfo(CurrencyFilter). The returned list is unmodifiable.

Parameters
filter:CurrencyMetaInfo.CurrencyFilter

the filter to control which currencies to return. If filter is null, returns all currencies for which information is available.

Returns:List<String>

the matching currency codes

ICU Status
Stable since ICU 4.4.
currencyDigitsback to summary
public CurrencyMetaInfo.CurrencyDigits currencyDigits(String isoCode)

Returns the CurrencyDigits for the currency code. This is equivalent to currencyDigits(isoCode, CurrencyUsage.STANDARD);

Parameters
isoCode:String

the currency code

Returns:CurrencyMetaInfo.CurrencyDigits

the CurrencyDigits

ICU Status
Stable since ICU 4.4.
currencyDigitsback to summary
public CurrencyMetaInfo.CurrencyDigits currencyDigits(String isoCode, Currency.CurrencyUsage currencyUsage)

Returns the CurrencyDigits for the currency code with Context Usage.

Parameters
isoCode:String

the currency code

currencyUsage:Currency.CurrencyUsage

the currency usage

Returns:CurrencyMetaInfo.CurrencyDigits

the CurrencyDigits

ICU Status
Stable since ICU 54.
currencyInfoback to summary
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:CurrencyMetaInfo.CurrencyFilter

the filter to control which currency info to return

Returns:List<CurrencyMetaInfo.CurrencyInfo>

the matching information

ICU Status
Stable since ICU 4.4.
dateStringback to summary
private static String dateString(long date)
debugStringback to summary
private static String debugString(Object o)
getInstanceback to summary
public static CurrencyMetaInfo getInstance()

Returns the unique instance of the currency meta info.

Returns:CurrencyMetaInfo

the meta info

ICU Status
Stable since ICU 4.4.
getInstanceback to summary
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:boolean

true if no substitute data should be used

Returns:CurrencyMetaInfo

the meta info, or null

ICU Status
Stable since ICU 49.
hasDataback to summary
public static boolean hasData()

Deprecated

This API is ICU internal only.

Returns true if there is data for the currency meta info.

Returns:boolean

true if there is actual data

Annotations
@Deprecated
ICU Status
Internal ICU component.
regionsback to summary
public List<String> regions(CurrencyMetaInfo.CurrencyFilter filter)

Returns the list of region codes matching the provided filter. Results are ordered as in currencyInfo(CurrencyFilter). The returned list is unmodifiable.

Parameters
filter:CurrencyMetaInfo.CurrencyFilter

the filter to control which regions to return. If filter is null, returns all regions for which information is available.

Returns:List<String>

the matching region codes

ICU Status
Stable since ICU 4.4.
com.ibm.icu.text back to summary

public final Class CurrencyMetaInfo.CurrencyDigits

extends Object
Class Inheritance

Represents the raw information about fraction digits and rounding increment.
ICU Status
Stable since ICU 4.4.

Field Summary

Modifier and TypeField and Description
public final int
fractionDigits

Number of fraction digits used to display this currency.

public final int
roundingIncrement

Rounding increment used when displaying this currency.

Constructor Summary

AccessConstructor and Description
public
CurrencyDigits(int
the fraction digits
fractionDigits
,
int
the rounding increment
roundingIncrement
)

Constructor for CurrencyDigits.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

A string representing the currency digits.
toString
()

Overrides java.lang.Object.toString.

Returns a string representing the currency digits, for debugging.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

fractionDigitsback to summary
public final int fractionDigits

Number of fraction digits used to display this currency.

ICU Status
Stable since ICU 49.
roundingIncrementback to summary
public final int roundingIncrement

Rounding increment used when displaying this currency.

ICU Status
Stable since ICU 49.

Constructor Detail

CurrencyDigitsback to summary
public CurrencyDigits(int fractionDigits, int roundingIncrement)

Constructor for CurrencyDigits.

Parameters
fractionDigits:int

the fraction digits

roundingIncrement:int

the rounding increment

ICU Status
Stable since ICU 4.4.

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representing the currency digits, for debugging.

Returns:String

A string representing the currency digits.

Annotations
@Override
ICU Status
Stable since ICU 4.4.
com.ibm.icu.text back to summary

public final Class CurrencyMetaInfo.CurrencyFilter

extends Object
Class Inheritance

A filter used to select which currency info is returned.
ICU Status
Stable since ICU 4.4.

Field Summary

Modifier and TypeField and Description
private static final CurrencyMetaInfo.CurrencyFilter
public final String
currency

The currency to filter on.

public final long
from

The from date to filter on (as milliseconds).

public final String
region

The region to filter on.

public final boolean
tenderOnly

true if we are filtering only for currencies used as legal tender.

public final long
to

The to date to filter on (as milliseconds).

Constructor Summary

AccessConstructor and Description
private
CurrencyFilter(String region, String currency, long from, long to, boolean tenderOnly)

Method Summary

Modifier and TypeMethod and Description
public static CurrencyMetaInfo.CurrencyFilter

Returns:

a filter
all
()

Returns a filter that accepts all currency data.

public boolean
equals(Object
the reference object with which to compare.
rhs
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public boolean

Returns:

true if the filters are equal
equals
(CurrencyMetaInfo.CurrencyFilter
the currency filter to compare to
rhs
)

Type-safe override of equals(Object).

private static boolean
equals(String lhs, String rhs)

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public static CurrencyMetaInfo.CurrencyFilter

Returns:

a filter
now
()

Returns a filter that accepts all currencies in use as of the current date.

public static CurrencyMetaInfo.CurrencyFilter

Returns:

a filter
onCurrency
(String
the currency code
currency
)

Returns a filter that accepts the given currency.

public static CurrencyMetaInfo.CurrencyFilter

Returns:

a filter
onDate
(Date
the date
date
)

Returns a filter that accepts all currencies in use on the given date.

public static CurrencyMetaInfo.CurrencyFilter
onDate(long
the date as milliseconds after Jan 1, 1970
date
)

Returns a filter that accepts all currencies in use on the given date.

public static CurrencyMetaInfo.CurrencyFilter

Returns:

a filter
onDateRange
(Date
date on or after a currency must have been in use
from
,
Date
date on or before which a currency must have been in use, or if equal to from, the date on which a currency must have been in use
to
)

Returns a filter that accepts all currencies that were in use at some point between the given dates, or if dates are equal, currencies in use on that date.

public static CurrencyMetaInfo.CurrencyFilter
onDateRange(long
The date on or after a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.
from
,
long
The date on or before which a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.
to
)

Returns a filter that accepts all currencies that were in use at some point between the given dates, or if dates are equal, currencies in use on that date.

public static CurrencyMetaInfo.CurrencyFilter

Returns:

a filter
onRegion
(String
the region code
region
)

Returns a filter that accepts all currencies ever used in the given region.

public static CurrencyMetaInfo.CurrencyFilter
onTender()

Returns a CurrencyFilter for finding currencies that were either once used, are used, or will be used as tender.

public String

Returns:

A string representing the filter.
toString
()

Overrides java.lang.Object.toString.

Returns a string representing the filter, for debugging.
public CurrencyMetaInfo.CurrencyFilter

Returns:

the filter
withCurrency
(String
the currency code
currency
)

Returns a copy of this filter, with the specified currency.

public CurrencyMetaInfo.CurrencyFilter

Returns:

the filter
withDate
(Date
the date on which the currency must have been in use
date
)

Returns a copy of this filter, with from and to set to the given date.

public CurrencyMetaInfo.CurrencyFilter
withDate(long
the date as milliseconds after Jan 1, 1970
date
)

Returns a copy of this filter that accepts all currencies in use on the given date.

public CurrencyMetaInfo.CurrencyFilter

Returns:

the filter
withDateRange
(Date
date on or after which the currency must have been in use
from
,
Date
date on or before which the currency must have been in use
to
)

Returns a copy of this filter, with from and to set to the given dates.

public CurrencyMetaInfo.CurrencyFilter
withDateRange(long
The date on or after a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.
from
,
long
The date on or before which a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.
to
)

Returns a copy of this filter that accepts all currencies that were in use at some point between the given dates, or if dates are equal, currencies in use on that date.

public CurrencyMetaInfo.CurrencyFilter

Returns:

the filter
withRegion
(String
the region code
region
)

Returns a copy of this filter, with the specified region.

public CurrencyMetaInfo.CurrencyFilter
withTender()

Returns a copy of this filter that filters for currencies that were either once used, are used, or will be used as tender.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

ALLback to summary
private static final CurrencyMetaInfo.CurrencyFilter ALL
currencyback to summary
public final String currency

The currency to filter on. If null, accepts any currency.

ICU Status
Stable since ICU 4.4.
fromback to summary
public final long from

The from date to filter on (as milliseconds). Accepts any currency on or after this date.

ICU Status
Stable since ICU 4.4.
regionback to summary
public final String region

The region to filter on. If null, accepts any region.

ICU Status
Stable since ICU 4.4.
tenderOnlyback to summary
public final boolean tenderOnly

Deprecated

This API is ICU internal only.

true if we are filtering only for currencies used as legal tender.

Annotations
@Deprecated
ICU Status
Internal ICU component.
toback to summary
public final long to

The to date to filter on (as milliseconds). Accepts any currency on or before this date.

ICU Status
Stable since ICU 4.4.

Constructor Detail

CurrencyFilterback to summary
private CurrencyFilter(String region, String currency, long from, long to, boolean tenderOnly)

Method Detail

allback to summary
public static CurrencyMetaInfo.CurrencyFilter all()

Returns a filter that accepts all currency data.

Returns:CurrencyMetaInfo.CurrencyFilter

a filter

ICU Status
Stable since ICU 4.4.
equalsback to summary
public boolean equals(Object rhs)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
rhs:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
ICU Status
Stable since ICU 4.4.
equalsback to summary
public boolean equals(CurrencyMetaInfo.CurrencyFilter rhs)

Type-safe override of equals(Object).

Parameters
rhs:CurrencyMetaInfo.CurrencyFilter

the currency filter to compare to

Returns:boolean

true if the filters are equal

ICU Status
Stable since ICU 4.4.
equalsback to summary
private static boolean equals(String lhs, String rhs)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
ICU Status
Stable since ICU 4.4.
nowback to summary
public static CurrencyMetaInfo.CurrencyFilter now()

Returns a filter that accepts all currencies in use as of the current date.

Returns:CurrencyMetaInfo.CurrencyFilter

a filter

ICU Status
Stable since ICU 4.4.
See Also
withDate(Date)
onCurrencyback to summary
public static CurrencyMetaInfo.CurrencyFilter onCurrency(String currency)

Returns a filter that accepts the given currency.

Parameters
currency:String

the currency code

Returns:CurrencyMetaInfo.CurrencyFilter

a filter

ICU Status
Stable since ICU 4.4.
See Also
withCurrency(String)
onDateback to summary
public static CurrencyMetaInfo.CurrencyFilter onDate(Date date)

Returns a filter that accepts all currencies in use on the given date.

Parameters
date:Date

the date

Returns:CurrencyMetaInfo.CurrencyFilter

a filter

ICU Status
Stable since ICU 4.4.
See Also
withDate(Date)
onDateback to summary
public static CurrencyMetaInfo.CurrencyFilter onDate(long date)

Returns a filter that accepts all currencies in use on the given date.

Parameters
date:long

the date as milliseconds after Jan 1, 1970

ICU Status
Stable since ICU 51.
onDateRangeback to summary
public static CurrencyMetaInfo.CurrencyFilter onDateRange(Date from, Date to)

Returns a filter that accepts all currencies that were in use at some point between the given dates, or if dates are equal, currencies in use on that date.

Parameters
from:Date

date on or after a currency must have been in use

to:Date

date on or before which a currency must have been in use, or if equal to from, the date on which a currency must have been in use

Returns:CurrencyMetaInfo.CurrencyFilter

a filter

ICU Status
Stable since ICU 49.
See Also
withDateRange(Date, Date)
onDateRangeback to summary
public static CurrencyMetaInfo.CurrencyFilter onDateRange(long from, long to)

Returns a filter that accepts all currencies that were in use at some point between the given dates, or if dates are equal, currencies in use on that date.

Parameters
from:long

The date on or after a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.

to:long

The date on or before which a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.

ICU Status
Stable since ICU 51.
onRegionback to summary
public static CurrencyMetaInfo.CurrencyFilter onRegion(String region)

Returns a filter that accepts all currencies ever used in the given region.

Parameters
region:String

the region code

Returns:CurrencyMetaInfo.CurrencyFilter

a filter

ICU Status
Stable since ICU 4.4.
See Also
withRegion(String)
onTenderback to summary
public static CurrencyMetaInfo.CurrencyFilter onTender()

Returns a CurrencyFilter for finding currencies that were either once used, are used, or will be used as tender.

ICU Status
Stable since ICU 51.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representing the filter, for debugging.

Returns:String

A string representing the filter.

Annotations
@Override
ICU Status
Stable since ICU 4.4.
withCurrencyback to summary
public CurrencyMetaInfo.CurrencyFilter withCurrency(String currency)

Returns a copy of this filter, with the specified currency. Currency can be null to indicate no filter on currency.

Parameters
currency:String

the currency code

Returns:CurrencyMetaInfo.CurrencyFilter

the filter

ICU Status
Stable since ICU 4.4.
See Also
onCurrency(String)
withDateback to summary
public CurrencyMetaInfo.CurrencyFilter withDate(Date date)

Returns a copy of this filter, with from and to set to the given date.

Parameters
date:Date

the date on which the currency must have been in use

Returns:CurrencyMetaInfo.CurrencyFilter

the filter

ICU Status
Stable since ICU 4.4.
See Also
onDate(Date)
withDateback to summary
public CurrencyMetaInfo.CurrencyFilter withDate(long date)

Returns a copy of this filter that accepts all currencies in use on the given date.

Parameters
date:long

the date as milliseconds after Jan 1, 1970

ICU Status
Stable since ICU 51.
withDateRangeback to summary
public CurrencyMetaInfo.CurrencyFilter withDateRange(Date from, Date to)

Returns a copy of this filter, with from and to set to the given dates.

Parameters
from:Date

date on or after which the currency must have been in use

to:Date

date on or before which the currency must have been in use

Returns:CurrencyMetaInfo.CurrencyFilter

the filter

ICU Status
Stable since ICU 49.
See Also
onDateRange(Date, Date)
withDateRangeback to summary
public CurrencyMetaInfo.CurrencyFilter withDateRange(long from, long to)

Returns a copy of this filter that accepts all currencies that were in use at some point between the given dates, or if dates are equal, currencies in use on that date.

Parameters
from:long

The date on or after a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.

to:long

The date on or before which a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.

ICU Status
Stable since ICU 51.
withRegionback to summary
public CurrencyMetaInfo.CurrencyFilter withRegion(String region)

Returns a copy of this filter, with the specified region. Region can be null to indicate no filter on region.

Parameters
region:String

the region code

Returns:CurrencyMetaInfo.CurrencyFilter

the filter

ICU Status
Stable since ICU 4.4.
See Also
onRegion(String)
withTenderback to summary
public CurrencyMetaInfo.CurrencyFilter withTender()

Returns a copy of this filter that filters for currencies that were either once used, are used, or will be used as tender.

ICU Status
Stable since ICU 51.
com.ibm.icu.text back to summary

public final Class CurrencyMetaInfo.CurrencyInfo

extends Object
Class Inheritance

Represents a complete currency info record listing the region, currency, from and to dates, and priority. Use CurrencyMetaInfo#currencyInfo(CurrencyFilter) for a list of info objects matching the filter.
ICU Status
Stable since ICU 4.4.

Field Summary

Modifier and TypeField and Description
public final String
code

The three-letter ISO currency code.

public final long
from

Date on which the currency was first officially used in the region.

public final int
priority

Preference order of currencies being used at the same time in the region.

public final String
region

Region code where currency is used.

private final boolean
public final long
to

Date at which the currency stopped being officially used in the region.

Constructor Summary

AccessConstructor and Description
public
CurrencyInfo(String region, String code, long from, long to, int priority)

Deprecated ICU 51 Use CurrencyMetaInfo#currencyInfo(CurrencyFilter) instead.
public
CurrencyInfo(String region, String code, long from, long to, int priority, boolean tender)

Deprecated This API is ICU internal only.
Constructs a currency info.

Method Summary

Modifier and TypeMethod and Description
public boolean
isTender()

Determine whether or not this currency was once used, is used, or will be used as tender in this region.

public String

Returns:

A string representation of this object.
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of this object, useful for debugging.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

codeback to summary
public final String code

The three-letter ISO currency code.

ICU Status
Stable since ICU 4.4.
fromback to summary
public final long from

Date on which the currency was first officially used in the region. This is midnight at the start of the first day on which the currency was used, GMT. If there is no date, this is Long.MIN_VALUE;

ICU Status
Stable since ICU 4.4.
priorityback to summary
public final int priority

Preference order of currencies being used at the same time in the region. Lower values are preferred (generally, this is a transition from an older to a newer currency). Priorities within a single country are unique.

ICU Status
Stable since ICU 49.
regionback to summary
public final String region

Region code where currency is used.

ICU Status
Stable since ICU 4.4.
tenderback to summary
private final boolean tender
toback to summary
public final long to

Date at which the currency stopped being officially used in the region. This is one millisecond before midnight at the end of the last day on which the currency was used, GMT. If there is no date, this is Long.MAX_VALUE.

ICU Status
Stable since ICU 4.4.

Constructor Detail

CurrencyInfoback to summary
public CurrencyInfo(String region, String code, long from, long to, int priority)

Deprecated

ICU 51 Use CurrencyMetaInfo#currencyInfo(CurrencyFilter) instead.

Annotations
@Deprecated
CurrencyInfoback to summary
public CurrencyInfo(String region, String code, long from, long to, int priority, boolean tender)

Deprecated

This API is ICU internal only.

Constructs a currency info.

Annotations
@Deprecated
ICU Status
Internal ICU component.

Method Detail

isTenderback to summary
public boolean isTender()

Determine whether or not this currency was once used, is used, or will be used as tender in this region.

ICU Status
Stable since ICU 51.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of this object, useful for debugging.

Returns:String

A string representation of this object.

Annotations
@Override
ICU Status
Stable since ICU 4.4.