Module java.money
Package javax.money

Class CurrencyQuery

All Implemented Interfaces:
Serializable

public final class CurrencyQuery extends AbstractQuery implements 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.
The effective attributes supported are only determined by the implementations of .CurrencyProviderSpi.

This class is immutable, serializable and thread-safe.

See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • KEY_QUERY_COUNTRIES

      static final String KEY_QUERY_COUNTRIES
      Key for storing a countries to be queried.
      See Also:
    • KEY_QUERY_CURRENCY_CODES

      static final String KEY_QUERY_CURRENCY_CODES
      Key for storing a target literal currency codes to be queried.
      See Also:
    • KEY_QUERY_NUMERIC_CODES

      static final String KEY_QUERY_NUMERIC_CODES
      Key for storing a target numeric currency codes to be queried.
      See Also:
  • Constructor Details

  • Method Details

    • getCountries

      public Collection<Locale> getCountries()
      Returns the target locales.
      Returns:
      the target locales, never null.
    • getCurrencyCodes

      public Collection<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 Collection<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

      public CurrencyQueryBuilder toBuilder()
      Creates a new builder instances, initialized with the data from this one.
      Returns:
      a new MonetaryAmountFactoryQueryBuilder instance, never null.