Top Description Fields Constructors Methods
javax.money.format

public final Class AmountFormatQuery

extends AbstractQuery
Class Inheritance
Imports
java.util.Locale, javax.money.AbstractQuery, .Monetary, .MonetaryAmountFactory

Query for accessing instances of javax.money.format.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.

Field Summary

Modifier and TypeField and Description
pack-priv static final String
KEY_QUERY_FORMAT_NAME

Key used for the format name attribute.

private static final long
Inherited from javax.money.AbstractQuery:
KEY_QUERY_PROVIDERSKEY_QUERY_TARGET_TYPEKEY_QUERY_TIMESTAMP

Constructor Summary

AccessConstructor and Description
pack-priv
AmountFormatQuery(AmountFormatQueryBuilder
the corresponding javax.money.format.AmountFormatQueryBuilder, not null.
builder
)

Constructor, used from the Builder.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the styleId, or null.
getFormatName
()

Gets a style's id.

public Locale

Returns:

the style's locale, or null.
getLocale
()

Gets a Locale to be applied.

public MonetaryAmountFactory<T extends MonetaryAmount>

Returns:

the monetary context, or null.
getMonetaryAmountFactory
()

Gets the javax.money.MonetaryAmountFactoryQuery to be used for accessing .MonetaryAmountFactory, when amount's are parsed.

public static AmountFormatQuery

Returns:

a new query instance
of
(Locale
the target locale, not null.
locale
,
String...
the providers to be used, not null.
providers
)

Creates a simple format query based on a single Locale, similar to (java.util.Locale).

public AmountFormatQueryBuilder

Returns:

a new preinitialized builder, never null.
toBuilder
()

Get a javax.money.format.AmountFormatQueryBuilder preinitialized with this context instance.

Inherited from javax.money.AbstractQuery:
getProviderNamesgetTargetType

Field Detail

KEY_QUERY_FORMAT_NAMEback to summary
pack-priv static final String KEY_QUERY_FORMAT_NAME

Key used for the format name attribute.

serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.money.AbstractQuery.serialVersionUID.

Constructor Detail

AmountFormatQueryback to summary
pack-priv AmountFormatQuery(AmountFormatQueryBuilder builder)

Constructor, used from the Builder.

Parameters
builder:AmountFormatQueryBuilder

the corresponding javax.money.format.AmountFormatQueryBuilder, not null.

Method Detail

getFormatNameback to summary
public String getFormatName()

Gets a style's id.

Returns:String

the styleId, or null.

getLocaleback to summary
public Locale getLocale()

Gets a Locale to be applied.

Returns:Locale

the style's locale, or null.

getMonetaryAmountFactoryback to summary
public MonetaryAmountFactory<T extends MonetaryAmount> getMonetaryAmountFactory()

Gets the javax.money.MonetaryAmountFactoryQuery to be used for accessing .MonetaryAmountFactory, when amount's are parsed.

Returns:MonetaryAmountFactory<T extends MonetaryAmount>

the monetary context, or null.

Annotations
@SuppressWarnings:rawtypes
ofback to summary
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:Locale

the target locale, not null.

providers:String[]

the providers to be used, not null.

Returns:AmountFormatQuery

a new query instance

toBuilderback to summary
public AmountFormatQueryBuilder toBuilder()

Get a javax.money.format.AmountFormatQueryBuilder preinitialized with this context instance.

Returns:AmountFormatQueryBuilder

a new preinitialized builder, never null.