public final class AmountFormatSymbols
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
AmountStyle to format MonetaryAmount instances.
Instances of this class can be obtained by calling of(Locale). If you need to
change any of these symbols, you can access also access a Builder by calling
toBuilder() .
This class itself has no dependencies to java.text to be platform independent.
Nevertheless the similarities are obvious. In most cases users will never work with this class
here explicitly, since it is loaded with correct localized platform defaults implicitly, when
accessing a default MonetaryAmountFormat instance.
java.text.DecimalFormat,
Locale,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
AmountFormatSymbols.Builder
Builder for creating new instances of
AmountFormatSymbols. |
| Modifier and Type | Method and Description |
|---|---|
static java.util.Set<java.util.Locale> |
getAvailableLocales()
Get all available locales.
|
java.lang.Character |
getDecimalSeparator()
Gets the character used for decimal sign.
|
java.lang.Character |
getDigit()
Gets the character used for a digit in a pattern.
|
java.lang.String |
getExponentSeparator()
Returns the string used to separate the mantissa from the exponent.
|
char[] |
getGroupingSeparators()
Gets the characters used for thousands separator.
|
java.lang.String |
getInfinity()
Gets the string used to represent infinity.
|
java.util.Locale |
getLocale()
Gets the
Locale of this format symbols. |
java.lang.Character |
getMinusSign()
Gets the character used to represent minus sign.
|
java.lang.Character |
getPatternSeparator()
Gets the character used to separate positive and negative subpatterns in a pattern.
|
java.lang.Character |
getZeroDigit()
Gets the character used for zero.
|
static AmountFormatSymbols |
of(java.util.Locale locale)
Get an
AmountFormatSymbols given a Locale. |
AmountFormatSymbols.Builder |
toBuilder()
Get a
AmountFormatSymbols.Builder initialized with this instance. |
java.lang.String |
toString() |
public static final java.util.Set<java.util.Locale> getAvailableLocales()
Locale returned of(Locale) will
return an instance of AmountFormatSymbols.null.public final java.lang.Character getDecimalSeparator()
public final java.lang.Character getDigit()
public final java.lang.String getExponentSeparator()
public final char[] getGroupingSeparators()
public final java.lang.String getInfinity()
public final java.util.Locale getLocale()
Locale of this format symbols.Locale of this format symbols, never null.public final java.lang.Character getMinusSign()
public final java.lang.Character getPatternSeparator()
public final java.lang.Character getZeroDigit()
public static final AmountFormatSymbols of(java.util.Locale locale)
AmountFormatSymbols given a Locale.locale - the target LocaleAmountFormatSymbols instance, never null.MonetaryException - if no registered AmountFormatSymbolsProviderSpi can provide a matching
instance.public AmountFormatSymbols.Builder toBuilder()
AmountFormatSymbols.Builder initialized with this instance.AmountFormatSymbols.Builder, never null.public java.lang.String toString()
toString in class java.lang.Object