public static final class CurrencyMetaInfo.CurrencyFilter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
currency
The currency to filter on.
|
long |
from
The from date to filter on (milliseconds).
|
java.lang.String |
region
The region to filter on.
|
long |
to
The to date to filter on (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(java.lang.Object rhs)
Overrides equals.
|
int |
hashCode()
Overrides hashCode.
|
static CurrencyMetaInfo.CurrencyFilter |
now()
Returns a filter that accepts all currencies in use as of the current date.
|
static CurrencyMetaInfo.CurrencyFilter |
onCurrency(java.lang.String currency)
Returns a filter that accepts the given currency.
|
static CurrencyMetaInfo.CurrencyFilter |
onDate(java.util.Date date)
Returns a filter that accepts all currencies in use on the given date.
|
static CurrencyMetaInfo.CurrencyFilter |
onRange(java.util.Date from,
java.util.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 |
onRegion(java.lang.String region)
Returns a filter that accepts all currencies ever used in the given region.
|
java.lang.String |
toString()
Returns a string representing the filter, for debugging.
|
CurrencyMetaInfo.CurrencyFilter |
withCurrency(java.lang.String currency)
Returns a copy of this filter, with the specified currency.
|
CurrencyMetaInfo.CurrencyFilter |
withDate(java.util.Date date)
Returns a copy of this filter, with from and to set to the given date.
|
CurrencyMetaInfo.CurrencyFilter |
withRange(java.util.Date from,
java.util.Date to)
Returns a copy of this filter, with from and to set to the given dates.
|
CurrencyMetaInfo.CurrencyFilter |
withRegion(java.lang.String region)
Returns a copy of this filter, with the specified region.
|
public final java.lang.String region
public final java.lang.String currency
public final long from
public final long to
public static CurrencyMetaInfo.CurrencyFilter all()
public static CurrencyMetaInfo.CurrencyFilter now()
withDate(Date)
public static CurrencyMetaInfo.CurrencyFilter onRegion(java.lang.String region)
region
- the region codewithRegion(String)
public static CurrencyMetaInfo.CurrencyFilter onCurrency(java.lang.String currency)
currency
- the currency codewithCurrency(String)
public static CurrencyMetaInfo.CurrencyFilter onDate(java.util.Date date)
date
- the datewithDate(Date)
public static CurrencyMetaInfo.CurrencyFilter onRange(java.util.Date from, java.util.Date to)
from
- date on or after a currency must have been in useto
- date before which a currency must have been in use, or if equal to from,
the date on which a currency must have been in usewithRange(Date, Date)
public CurrencyMetaInfo.CurrencyFilter withRegion(java.lang.String region)
region
- the region codeonRegion(String)
public CurrencyMetaInfo.CurrencyFilter withCurrency(java.lang.String currency)
currency
- the currency codeonCurrency(String)
public CurrencyMetaInfo.CurrencyFilter withDate(java.util.Date date)
date
- the date on which the currency must have been in useonDate(Date)
public CurrencyMetaInfo.CurrencyFilter withRange(java.util.Date from, java.util.Date to)
from
- date on or after which the currency must have been in useto
- date before which the currency must have been in useonRange(Date, Date)
public boolean equals(java.lang.Object rhs)
equals
in class java.lang.Object
public boolean equals(CurrencyMetaInfo.CurrencyFilter rhs)
equals(Object)
.rhs
- the currency filter to compare topublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright (c) 2011 IBM Corporation and others.