java.lang.Object
javax.money.AbstractContext
javax.money.AbstractQuery
javax.money.CurrencyQuery
- All Implemented Interfaces:
java.io.Serializable
public final class CurrencyQuery extends AbstractQuery implements java.io.Serializable
This class models a query for accessing instances of
CurrencyUnit
. It
provides information such as
- the providers that may provide
CurrencyUnit
instances - any other attributes, identified by the attribute type, e.g. regions, tenants,
a target timestamp / temporal unit, when the
CurrencyUnit
instances should be valid, etc.
.CurrencyProviderSpi
.
This class is immutable, serializable and thread-safe.
- Author:
- Anatole Tresch
- See Also:
- Serialized Form
-
Field Summary
Fields inherited from class javax.money.AbstractQuery
KEY_QUERY_PROVIDERS, KEY_QUERY_TARGET_TYPE, KEY_QUERY_TIMESTAMP
-
Method Summary
Modifier and Type Method Description java.util.Collection<java.util.Locale>
getCountries()
Returns the target locales.java.util.Collection<java.lang.String>
getCurrencyCodes()
Gets the currency codes, or the regular expression to select codes.java.util.Collection<java.lang.Integer>
getNumericCodes()
Gets the numeric codes.CurrencyQueryBuilder
toBuilder()
Creates a new builder instances, initialized with the data from this one.
-
Method Details
-
getCountries
public java.util.Collection<java.util.Locale> getCountries()Returns the target locales.- Returns:
- the target locales, never null.
-
getCurrencyCodes
public java.util.Collection<java.lang.String> getCurrencyCodes()Gets the currency codes, or the regular expression to select codes.- Returns:
- the target currency codes or the regular expression, never null.
-
getNumericCodes
public java.util.Collection<java.lang.Integer> getNumericCodes()Gets the numeric codes. Setting it to -1 search for currencies that have no numeric code.- Returns:
- the target numeric codes, never null.
-
toBuilder
Creates a new builder instances, initialized with the data from this one.- Returns:
- a new
MonetaryAmountFactoryQueryBuilder
instance, never null.
-