# DecimalStyle

public final class **DecimalStyle** extends [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)  
Localized decimal style used in date and time formatting.


A significant part of dealing with dates and times is the localization.
This class acts as a central point for accessing the information.

### Field Summary

|---|---|---|
| public static final [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html) | [STANDARD](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#STANDARD) | The standard set of non-localized decimal style symbols. |

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Checks if this DecimalStyle is equal to another DecimalStyle. |
| static [Set](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html)\<[Locale](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Locale.html)\> | [getAvailableLocales](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#getAvailableLocales())() Lists all the locales that are supported. |
| char | [getDecimalSeparator](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#getDecimalSeparator())() Gets the character that represents the decimal point. |
| char | [getNegativeSign](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#getNegativeSign())() Gets the character that represents the negative sign. |
| char | [getPositiveSign](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#getPositiveSign())() Gets the character that represents the positive sign. |
| char | [getZeroDigit](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#getZeroDigit())() Gets the character that represents zero. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#hashCode())() A hash code for this DecimalStyle. |
| static [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html) | [of](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#of(java.util.Locale))([Locale](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Locale.html) locale) Obtains the DecimalStyle for the specified locale. |
| static [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html) | [ofDefaultLocale](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#ofDefaultLocale())() Obtains the DecimalStyle for the default `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Locale.Category.html#FORMAT` locale. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#toString())() Returns a string describing this DecimalStyle. |
| [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html) | [withDecimalSeparator](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#withDecimalSeparator(char))(char decimalSeparator) Returns a copy of the info with a new character that represents the decimal point. |
| [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html) | [withNegativeSign](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#withNegativeSign(char))(char negativeSign) Returns a copy of the info with a new character that represents the negative sign. |
| [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html) | [withPositiveSign](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#withPositiveSign(char))(char positiveSign) Returns a copy of the info with a new character that represents the positive sign. |
| [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html) | [withZeroDigit](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#withZeroDigit(char))(char zeroDigit) Returns a copy of the info with a new character that represents zero. |

### Inherited Method Summary

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

## Fields

#### public static final DecimalStyle
**STANDARD**

The standard set of non-localized decimal style symbols.


This uses standard ASCII characters for zero, positive, negative and a dot for the decimal point.

## Public Methods

#### public boolean
**equals**
([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj)

Checks if this DecimalStyle is equal to another DecimalStyle.

##### Parameters

| obj | the object to check, null returns false |
|---|---|

##### Returns

- true if this is equal to the other date

#### public static [Set](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Set.html)\<[Locale](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Locale.html)\>
**getAvailableLocales**
()

Lists all the locales that are supported.


The locale 'en_US' will always be present.

##### Returns

- a Set of Locales for which localization is supported

#### public char
**getDecimalSeparator**
()

Gets the character that represents the decimal point.


The character used to represent a decimal point may vary by culture.
This method specifies the character to use.

##### Returns

- the character for the decimal point

#### public char
**getNegativeSign**
()

Gets the character that represents the negative sign.


The character used to represent a negative number may vary by culture.
This method specifies the character to use.

##### Returns

- the character for the negative sign

#### public char
**getPositiveSign**
()

Gets the character that represents the positive sign.


The character used to represent a positive number may vary by culture.
This method specifies the character to use.

##### Returns

- the character for the positive sign

#### public char
**getZeroDigit**
()

Gets the character that represents zero.


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.

##### Returns

- the character for zero

#### public int
**hashCode**
()

A hash code for this DecimalStyle.

##### Returns

- a suitable hash code

#### public static [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html)
**of**
([Locale](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Locale.html) locale)

Obtains the DecimalStyle for the specified locale.


This method provides access to locale sensitive decimal style symbols.

##### Parameters

| locale | the locale, not null |
|---|---|

##### Returns

- the decimal style, not null

#### public static [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html)
**ofDefaultLocale**
()

Obtains the DecimalStyle for the default
`https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Locale.Category.html#FORMAT` locale.


This method provides access to locale sensitive decimal style symbols.


This is equivalent to calling
`https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html#of(java.util.Locale)`.

##### Returns

- the decimal style, not null

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Locale.Category.html#FORMAT`

#### public [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**toString**
()

Returns a string describing this DecimalStyle.

##### Returns

- a string description, not null

#### public [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html)
**withDecimalSeparator**
(char decimalSeparator)

Returns a copy of the info with a new character that represents the decimal point.


The character used to represent a decimal point may vary by culture.
This method specifies the character to use.

##### Parameters

| decimalSeparator | the character for the decimal point |
|---|---|

##### Returns

- a copy with a new character that represents the decimal point, not null

#### public [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html)
**withNegativeSign**
(char negativeSign)

Returns a copy of the info with a new character that represents the negative sign.


The character used to represent a negative number may vary by culture.
This method specifies the character to use.

##### Parameters

| negativeSign | the character for the negative sign |
|---|---|

##### Returns

- a copy with a new character that represents the negative sign, not null

#### public [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html)
**withPositiveSign**
(char positiveSign)

Returns a copy of the info with a new character that represents the positive sign.


The character used to represent a positive number may vary by culture.
This method specifies the character to use.

##### Parameters

| positiveSign | the character for the positive sign |
|---|---|

##### Returns

- a copy with a new character that represents the positive sign, not null

#### public [DecimalStyle](https://developers.google.com/j2objc/javadoc/jre/reference/java/time/format/DecimalStyle.html)
**withZeroDigit**
(char zeroDigit)

Returns a copy of the info with a new character that represents zero.


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.

##### Parameters

| zeroDigit | the character for zero |
|---|---|

##### Returns

- a copy with a new character that represents zero, not null