public final class DateTimeFormatSymbols extends Object
Modifier and Type | Method and Description |
---|---|
int |
convertToDigit(char ch)
Checks whether the character is a digit, based on the currently set zero character.
|
static Locale[] |
getAvailableLocales()
Returns an array of all locales for which the
getInstance
methods of this class can return localized instances. |
char |
getDecimalPointChar()
Gets the character that represents the decimal point.
|
char |
getDigitChar(int digit)
Gets the character that represents the specified digit.
|
static DateTimeFormatSymbols |
getInstance()
Gets the
DateFormatSymbols instance for the default
locale. |
static DateTimeFormatSymbols |
getInstance(Locale locale)
Gets the
DateFormatSymbols instance for the specified
locale. |
Locale |
getLocale()
Gets the locale to use for printing and parsing text.
|
char |
getNegativeSignChar()
Gets the character that represents the negative sign.
|
char |
getPositiveSignChar()
Gets the character that represents the positive sign.
|
char |
getZeroChar()
Gets the character that represents zero.
|
public static Locale[] getAvailableLocales()
getInstance
methods of this class can return localized instances. The returned array
represents the union of locales supported by the Java runtime and by
installed
DateTimeFormatSymbolsProvider
implementations. It must contain at least a Locale
instance equal to Locale.US
.DateTimeFormatSymbols
instances are availablepublic static DateTimeFormatSymbols getInstance()
DateFormatSymbols
instance for the default
locale. This method provides access to DateFormatSymbols
instances for locales supported by the Java runtime itself as well as for
those supported by installed
DateFormatSymbolsProvider
implementations.DateTimeFormatSymbols
instance.public static DateTimeFormatSymbols getInstance(Locale locale)
DateFormatSymbols
instance for the specified
locale. This method provides access to DateFormatSymbols
instances for locales supported by the Java runtime itself as well as for
those supported by installed
DateFormatSymbolsProvider
implementations.locale
- the given locale, not nullDateTimeFormatSymbols
instanceNullPointerException
- if locale
is nullpublic Locale getLocale()
The locale information for printing and parsing numbers is defined in the zero, negative and positive characters.
public char getZeroChar()
This character can vary by locale.
public char getDigitChar(int digit)
This character can vary by locale. The characters for one to nine are based on the stored zero character.
digit
- the single digit to convert to a character, from 0 to 9public int convertToDigit(char ch)
ch
- the character to checkpublic char getPositiveSignChar()
This character can vary by locale.
public char getNegativeSignChar()
This character can vary by locale.
public char getDecimalPointChar()
This character can vary by locale.
Copyright © 2014. All rights reserved.