public final class DecimalStyle
extends java.lang.Object
A significant part of dealing with dates and times is the localization. This class acts as a central point for accessing the information.
| Modifier and Type | Field | Description |
|---|---|---|
static DecimalStyle |
STANDARD |
The standard set of non-localized symbols.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object obj) |
Checks if these symbols equal another set of symbols.
|
static java.util.Set<java.util.Locale> |
getAvailableLocales() |
Lists all the locales that are supported.
|
char |
getDecimalSeparator() |
Gets the character that represents the decimal point.
|
char |
getNegativeSign() |
Gets the character that represents the negative sign.
|
char |
getPositiveSign() |
Gets the character that represents the positive sign.
|
char |
getZeroDigit() |
Gets the character that represents zero.
|
int |
hashCode() |
A hash code for these symbols.
|
static DecimalStyle |
of(java.util.Locale locale) |
Obtains symbols for the specified locale.
|
static DecimalStyle |
ofDefaultLocale() |
Obtains symbols for the default locale.
|
java.lang.String |
toString() |
Returns a string describing these symbols.
|
DecimalStyle |
withDecimalSeparator(char decimalSeparator) |
Returns a copy of the info with a new character that represents the decimal point.
|
DecimalStyle |
withNegativeSign(char negativeSign) |
Returns a copy of the info with a new character that represents the negative sign.
|
DecimalStyle |
withPositiveSign(char positiveSign) |
Returns a copy of the info with a new character that represents the positive sign.
|
DecimalStyle |
withZeroDigit(char zeroDigit) |
Returns a copy of the info with a new character that represents zero.
|
public static final DecimalStyle STANDARD
This uses standard ASCII characters for zero, positive, negative and a dot for the decimal point.
public static java.util.Set<java.util.Locale> getAvailableLocales()
The locale 'en_US' will always be present.
public static DecimalStyle ofDefaultLocale()
This method provides access to locale sensitive symbols.
public static DecimalStyle of(java.util.Locale locale)
This method provides access to locale sensitive symbols.
locale - the locale, not nullpublic char getZeroDigit()
The character used to represent digits may vary by culture. This method specifies the zero character to use, which implies the characters for one to nine.
public DecimalStyle withZeroDigit(char zeroDigit)
The character used to represent digits may vary by culture. This method specifies the zero character to use, which implies the characters for one to nine.
zeroDigit - the character for zeropublic char getPositiveSign()
The character used to represent a positive number may vary by culture. This method specifies the character to use.
public DecimalStyle withPositiveSign(char positiveSign)
The character used to represent a positive number may vary by culture. This method specifies the character to use.
positiveSign - the character for the positive signpublic char getNegativeSign()
The character used to represent a negative number may vary by culture. This method specifies the character to use.
public DecimalStyle withNegativeSign(char negativeSign)
The character used to represent a negative number may vary by culture. This method specifies the character to use.
negativeSign - the character for the negative signpublic char getDecimalSeparator()
The character used to represent a decimal point may vary by culture. This method specifies the character to use.
public DecimalStyle withDecimalSeparator(char decimalSeparator)
The character used to represent a decimal point may vary by culture. This method specifies the character to use.
decimalSeparator - the character for the decimal pointpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object to check, null returns falsepublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2007–2018 ThreeTen.org. All rights reserved.