public final class AmountStyle
extends java.lang.Object
implements java.io.Serializable
AmountStyle defines how a MonetaryAmount should be formatted and
is used within a MonetaryAmountFormat.MonetaryAmountFormat,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
AmountStyle.Builder
Builder for creating a new
AmountStyle. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
static java.util.Set<java.util.Locale> |
getAvailableLocales()
Get all available locales.
|
CurrencyStyle |
getCurrencyStyle()
Access the
CurrencyStyle to be used. |
MonetaryOperator |
getDisplayConversion()
Get the conversion applied before formatting.
|
int[] |
getGroupingSizes()
Get the number groups sizes used, or an empty array if no custom sizes are configured.
|
java.util.Locale |
getLocale()
Access the style's
Locale. |
java.lang.String |
getLocalizedPattern()
Access the style's pattern, localized with the values from
AmountFormatSymbols. |
MonetaryOperator |
getParseConversion()
Get the conversion applied after parsing.
|
java.lang.String |
getPattern()
Access the style's pattern.
|
AmountFormatSymbols |
getSymbols()
Access the style's
AmountFormatSymbols. |
int |
hashCode() |
static AmountStyle |
of(java.util.Locale locale)
Get an
AmountStyle given a Locale. |
AmountStyle.Builder |
toBuilder() |
java.lang.String |
toString() |
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic static final java.util.Set<java.util.Locale> getAvailableLocales()
Locale returned of(Locale) will
return an instance of AmountStyle.null.public CurrencyStyle getCurrencyStyle()
CurrencyStyle to be used.public MonetaryOperator getDisplayConversion()
null.public int[] getGroupingSizes()
null.public java.util.Locale getLocale()
Locale.Locale, never null.public java.lang.String getLocalizedPattern()
AmountFormatSymbols.null.public MonetaryOperator getParseConversion()
null.public java.lang.String getPattern()
null.public AmountFormatSymbols getSymbols()
AmountFormatSymbols.AmountFormatSymbols, never null.public int hashCode()
hashCode in class java.lang.Objectpublic static final AmountStyle of(java.util.Locale locale)
AmountStyle given a Locale.locale - the target LocaleAmountStyle instance, never null.MonetaryException - if no registered AmountStyleProviderSpi can provide a matching instance.public AmountStyle.Builder toBuilder()
public java.lang.String toString()
toString in class java.lang.Object