public static final class CurrencyMetaInfo.CurrencyFilter extends Object
Modifier and Type | Field and Description |
---|---|
String |
currency
The currency to filter on.
|
long |
from
The from date to filter on (as milliseconds).
|
String |
region
The region to filter on.
|
boolean |
tenderOnly
Deprecated.
This API is ICU internal only.
|
long |
to
The to date to filter on (as milliseconds).
|
Modifier and Type | Method and Description |
---|---|
static CurrencyMetaInfo.CurrencyFilter |
all()
Returns a filter that accepts all currency data.
|
boolean |
equals(CurrencyMetaInfo.CurrencyFilter rhs)
Type-safe override of
equals(Object) . |
boolean |
equals(Object rhs) |
int |
hashCode() |
static CurrencyMetaInfo.CurrencyFilter |
now()
Returns a filter that accepts all currencies in use as of the current date.
|
static CurrencyMetaInfo.CurrencyFilter |
onCurrency(String currency)
Returns a filter that accepts the given currency.
|
static CurrencyMetaInfo.CurrencyFilter |
onDate(Date date)
Returns a filter that accepts all currencies in use on the given date.
|
static CurrencyMetaInfo.CurrencyFilter |
onDate(long date)
Returns a filter that accepts all currencies in use on the given date.
|
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.
|
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.
|
static CurrencyMetaInfo.CurrencyFilter |
onRegion(String region)
Returns a filter that accepts all currencies ever used in the given region.
|
static CurrencyMetaInfo.CurrencyFilter |
onTender()
Returns a CurrencyFilter for finding currencies that were either once used,
are used, or will be used as tender.
|
String |
toString()
Returns a string representing the filter, for debugging.
|
CurrencyMetaInfo.CurrencyFilter |
withCurrency(String currency)
Returns a copy of this filter, with the specified currency.
|
CurrencyMetaInfo.CurrencyFilter |
withDate(Date date)
Returns a copy of this filter, with from and to set to the given date.
|
CurrencyMetaInfo.CurrencyFilter |
withDate(long date)
Returns a copy of this filter that accepts all currencies in use on
the given date.
|
CurrencyMetaInfo.CurrencyFilter |
withDateRange(Date from,
Date to)
Returns a copy of this filter, with from and to set to the given dates.
|
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.
|
CurrencyMetaInfo.CurrencyFilter |
withRegion(String region)
Returns a copy of this filter, with the specified region.
|
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.
|
public final String region
public final String currency
public final long from
public final long to
public final boolean tenderOnly
public static CurrencyMetaInfo.CurrencyFilter all()
public static CurrencyMetaInfo.CurrencyFilter now()
withDate(Date)
public static CurrencyMetaInfo.CurrencyFilter onRegion(String region)
region
- the region codewithRegion(String)
public static CurrencyMetaInfo.CurrencyFilter onCurrency(String currency)
currency
- the currency codewithCurrency(String)
public static CurrencyMetaInfo.CurrencyFilter onDate(Date date)
date
- the datewithDate(Date)
public static CurrencyMetaInfo.CurrencyFilter onDateRange(Date from, Date to)
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 usewithDateRange(Date, Date)
public static CurrencyMetaInfo.CurrencyFilter onDate(long date)
date
- the date as milliseconds after Jan 1, 1970public static CurrencyMetaInfo.CurrencyFilter onDateRange(long from, long to)
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.public static CurrencyMetaInfo.CurrencyFilter onTender()
public CurrencyMetaInfo.CurrencyFilter withRegion(String region)
region
- the region codeonRegion(String)
public CurrencyMetaInfo.CurrencyFilter withCurrency(String currency)
currency
- the currency codeonCurrency(String)
public CurrencyMetaInfo.CurrencyFilter withDate(Date date)
date
- the date on which the currency must have been in useonDate(Date)
public CurrencyMetaInfo.CurrencyFilter withDateRange(Date from, Date to)
from
- date on or after which the currency must have been in useto
- date on or before which the currency must have been in useonDateRange(Date, Date)
public CurrencyMetaInfo.CurrencyFilter withDate(long date)
date
- the date as milliseconds after Jan 1, 1970public CurrencyMetaInfo.CurrencyFilter withDateRange(long from, long to)
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.public CurrencyMetaInfo.CurrencyFilter withTender()
public boolean equals(CurrencyMetaInfo.CurrencyFilter rhs)
equals(Object)
.rhs
- the currency filter to compare toCopyright (c) 2013 IBM Corporation and others.