Package com.ibm.icu.text
Class CurrencyMetaInfo.CurrencyFilter
java.lang.Object
com.ibm.icu.text.CurrencyMetaInfo.CurrencyFilter
- Enclosing class:
CurrencyMetaInfo
A filter used to select which currency info is returned.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionall()
Returns a filter that accepts all currency data.boolean
Type-safe override ofequals(Object)
.boolean
int
hashCode()
now()
Returns a filter that accepts all currencies in use as of the current date.onCurrency
(String currency) Returns a filter that accepts the given currency.onDate
(long date) Returns a filter that accepts all currencies in use on the given date.Returns a filter that accepts all currencies in use on the given date.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.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.Returns a filter that accepts all currencies ever used in the given region.onTender()
Returns a CurrencyFilter for finding currencies that were either once used, are used, or will be used as tender.toString()
Returns a string representing the filter, for debugging.withCurrency
(String currency) Returns a copy of this filter, with the specified currency.withDate
(long date) Returns a copy of this filter that accepts all currencies in use on the given date.Returns a copy of this filter, with from and to set to the given date.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.withDateRange
(Date from, Date to) Returns a copy of this filter, with from and to set to the given dates.withRegion
(String region) Returns a copy of this filter, with the specified region.Returns a copy of this filter that filters for currencies that were either once used, are used, or will be used as tender.
-
Field Details
-
region
The region to filter on. If null, accepts any region. -
currency
The currency to filter on. If null, accepts any currency. -
from
public final long fromThe from date to filter on (as milliseconds). Accepts any currency on or after this date. -
to
public final long toThe to date to filter on (as milliseconds). Accepts any currency on or before this date. -
tenderOnly
Deprecated.This API is ICU internal only.true if we are filtering only for currencies used as legal tender.
-
-
Method Details
-
all
Returns a filter that accepts all currency data.- Returns:
- a filter
-
now
Returns a filter that accepts all currencies in use as of the current date.- Returns:
- a filter
- See Also:
-
onRegion
Returns a filter that accepts all currencies ever used in the given region.- Parameters:
region
- the region code- Returns:
- a filter
- See Also:
-
onCurrency
Returns a filter that accepts the given currency.- Parameters:
currency
- the currency code- Returns:
- a filter
- See Also:
-
onDate
Returns a filter that accepts all currencies in use on the given date.- Parameters:
date
- the date- Returns:
- a filter
- See Also:
-
onDateRange
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 on or after a currency must have been in useto
- 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:
- a filter
- See Also:
-
onDate
Returns a filter that accepts all currencies in use on the given date.- Parameters:
date
- the date as milliseconds after Jan 1, 1970
-
onDateRange
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
- The date on or after a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.to
- The date on or before which a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.
-
onTender
Returns a CurrencyFilter for finding currencies that were either once used, are used, or will be used as tender. -
withRegion
Returns a copy of this filter, with the specified region. Region can be null to indicate no filter on region.- Parameters:
region
- the region code- Returns:
- the filter
- See Also:
-
withCurrency
Returns a copy of this filter, with the specified currency. Currency can be null to indicate no filter on currency.- Parameters:
currency
- the currency code- Returns:
- the filter
- See Also:
-
withDate
Returns a copy of this filter, with from and to set to the given date.- Parameters:
date
- the date on which the currency must have been in use- Returns:
- the filter
- See Also:
-
withDateRange
Returns a copy of this filter, with from and to set to the given dates.- Parameters:
from
- date on or after which the currency must have been in useto
- date on or before which the currency must have been in use- Returns:
- the filter
- See Also:
-
withDate
Returns a copy of this filter that accepts all currencies in use on the given date.- Parameters:
date
- the date as milliseconds after Jan 1, 1970
-
withDateRange
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
- The date on or after a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.to
- The date on or before which a currency must have been in use. Measured in milliseconds since Jan 1, 1970 GMT.
-
withTender
Returns a copy of this filter that filters for currencies that were either once used, are used, or will be used as tender. -
equals
-
equals
Type-safe override ofequals(Object)
.- Parameters:
rhs
- the currency filter to compare to- Returns:
- true if the filters are equal
-
hashCode
public int hashCode() -
toString
Returns a string representing the filter, for debugging.
-