public final class AmountFormatContextBuilder extends AbstractContextBuilder<AmountFormatContextBuilder,AmountFormatContext>
AmountFormatContext
adding detailed
information
about a MonetaryAmountFormat
instance.
Note this class is NOT thread-safe.
MonetaryAmountFormat.getContext()
importContext, importContext, removeAttributes, set, set, set, set, set, set, set, set, set, setProviderName, toString
public AmountFormatContextBuilder setFormatName(String formatName)
formatName
- the formatName, not null.public AmountFormatContextBuilder setLocale(Locale locale)
locale
- the locale, not null.public AmountFormatContextBuilder setMonetaryAmountFactory(MonetaryAmountFactory monetaryAmountBuilder)
MonetaryContext
to be used, when amount's are parsed.monetaryAmountBuilder
- the monetary amount factory, not null
.public AmountFormatContext build()
AmountFormatContext
that configures a .MonetaryAmountFormat
.build
in class AbstractContextBuilder<AmountFormatContextBuilder,AmountFormatContext>
AmountFormatContext
instance.public static AmountFormatContextBuilder create(AmountFormatQuery formatQuery)
AmountFormatContextBuilder
.formatQuery
- the base AmountFormatContext
, not null
.AmountFormatContextBuilder
instance, never null.public static AmountFormatContextBuilder of(AmountFormatContext context)
AmountFormatContextBuilder
.context
- the AmountFormatContext
AmountFormatContextBuilder
instance, never null.public static AmountFormatContextBuilder of(String formatName)
AmountFormatContextBuilder
.formatName
- the target formatName String
, not null
.AmountFormatContextBuilder
instance, never null.public static AmountFormatContextBuilder of(Locale locale)
AmountFormatContextBuilder
for a formatter based on the locale specific
defaults.locale
- the target Locale
, not null
.AmountFormatContextBuilder
instance, never null.Copyright © 2012–2016 JSR 354 - Expert Group. All rights reserved.