public static final class AmountStyle.Builder
extends java.lang.Object
AmountStyle.| Constructor and Description |
|---|
AmountStyle.Builder(AmountStyle style)
Creates a new
AmountStyle.Builder. |
AmountStyle.Builder(java.util.Locale locale)
Creates a new
AmountStyle.Builder. |
| Modifier and Type | Method and Description |
|---|---|
AmountStyle |
build()
Creates a new
AmountStyle. |
AmountStyle.Builder |
setCurrencyStyle(CurrencyStyle currencyStyle)
Set the
CurrencyStyle to be used for rendering the
CurrencyUnit. |
AmountStyle.Builder |
setDisplayConversion(MonetaryOperator conversion)
Sets the conversion to be applied before formatting.
|
AmountStyle.Builder |
setGroupingSizes(int... groupSizes)
Sets the customized number group sizes to be used for formatting.
|
AmountStyle.Builder |
setParseConversion(MonetaryOperator conversion)
Sets the conversion to be applied after parsing.
|
AmountStyle.Builder |
setPattern(java.lang.String pattern)
Set the
java.text.DecimalFormat as defined by
java.text.DecimalFormat#getInstance(Locale) by the given Locale . |
AmountStyle.Builder |
setSymbols(AmountFormatSymbols symbols)
Sets the
AmountFormatSymbols to be used. |
java.lang.String |
toString() |
AmountStyle.Builder |
withSymbols(AmountFormatSymbols symbols)
Sets the
AmountFormatSymbols. |
public AmountStyle.Builder(AmountStyle style)
AmountStyle.Builder.style - the base AmountStyle, not null.public AmountStyle.Builder(java.util.Locale locale)
AmountStyle.Builder.locale - the target Locale, not null.public AmountStyle build()
AmountStyle.AmountStyle instance, never null.java.lang.IllegalStateException - if no AmountStyle could be created.public AmountStyle.Builder setCurrencyStyle(CurrencyStyle currencyStyle)
CurrencyStyle to be used for rendering the
CurrencyUnit.currencyStyle - The CurrencyStyle to be used, not null.AmountStyle.Builder for chaining.public AmountStyle.Builder setDisplayConversion(MonetaryOperator conversion)
conversion - the conversion.AmountStyle.Builder for chaining.public AmountStyle.Builder setGroupingSizes(int... groupSizes)
groupSizes - the group sizes, not null.AmountStyle.Builder for chaining.public AmountStyle.Builder setParseConversion(MonetaryOperator conversion)
conversion - the conversion.AmountStyle.Builder for chaining.public AmountStyle.Builder setPattern(java.lang.String pattern)
java.text.DecimalFormat as defined by
java.text.DecimalFormat#getInstance(Locale) by the given Locale .pattern - The (non localized) pattern to be used, not null.AmountStyle.Builder for chaining.java.text.DecimalFormat#getInstance(Locale)public AmountStyle.Builder setSymbols(AmountFormatSymbols symbols)
AmountFormatSymbols to be used.symbols - the AmountFormatSymbols, not null.AmountStyle.Builder for chaining.public java.lang.String toString()
toString in class java.lang.Objectpublic AmountStyle.Builder withSymbols(AmountFormatSymbols symbols)
AmountFormatSymbols.symbols - The target AmountFormatSymbols, not null.AmountStyle.Builder for chaining.