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)
Compares this instance with the specified object and indicates if they
are equal.
|
int |
hashCode()
Returns an integer hash code for this object.
|
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
@Deprecated 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(Object rhs)
o must represent the same object
as this instance using a class-specific comparison. The general contract
is that this comparison should be reflexive, symmetric, and transitive.
Also, no object reference other than null is equal to null.
The default implementation returns true only if this ==
o. See Writing a correct
equals method
if you intend implementing your own equals method.
The general contract for the equals and Object.hashCode() methods is that if equals returns true for
any two objects, then hashCode() must return the same value for
these objects. This means that subclasses of Object usually
override either both methods or neither of them.
equals in class Objectrhs - the object to compare this instance with.true if the specified object is equal to this Object; false otherwise.Object.hashCode()public boolean equals(CurrencyMetaInfo.CurrencyFilter rhs)
equals(Object).rhs - the currency filter to compare topublic int hashCode()
Object.equals(java.lang.Object) returns true must return
the same hash code value. This means that subclasses of Object
usually override both methods or neither method.
Note that hash values must not change over time unless information used in equals comparisons also changes.
See Writing a correct
hashCode method
if you intend implementing your own hashCode method.
hashCode in class ObjectObject.equals(java.lang.Object)