Module java.money

Class AmountFormatQuery

All Implemented Interfaces:
Serializable

public final class AmountFormatQuery extends AbstractQuery
Query for accessing instances of MonetaryAmountFormat. In general it is determined by the implementation, what formats are provided. Nevertheless the following queries must be supported: All other formats are optional. For further details about supported formats refer to the implementation's documentation.

This class is immutable, thread-safe and serializable.

See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • getFormatName

      public String getFormatName()
      Gets a style's id.
      Returns:
      the styleId, or null.
    • getLocale

      public Locale getLocale()
      Gets a Locale to be applied.
      Returns:
      the style's locale, or null.
    • getMonetaryAmountFactory

      public MonetaryAmountFactory getMonetaryAmountFactory()
      Gets the MonetaryAmountFactoryQuery to be used for accessing .MonetaryAmountFactory, when amount's are parsed.
      Returns:
      the monetary context, or null.
    • of

      public static AmountFormatQuery of(Locale locale, String... providers)
      Creates a simple format query based on a single Locale, similar to (java.util.Locale).
      Parameters:
      locale - the target locale, not null.
      providers - the providers to be used, not null.
      Returns:
      a new query instance
    • toBuilder

      public AmountFormatQueryBuilder toBuilder()
      Get a AmountFormatQueryBuilder preinitialized with this context instance.
      Returns:
      a new preinitialized builder, never null.