Added in API level 24

DecimalFormatSymbols


open class DecimalFormatSymbols : Cloneable, Serializable
kotlin.Any
   ↳ android.icu.text.DecimalFormatSymbols

[icu enhancement] ICU's replacement for java.text.DecimalFormatSymbols. Methods, fields, and other functionality specific to ICU are labeled '[icu]'. This class represents the set of symbols (such as the decimal separator, the grouping separator, and so on) needed by DecimalFormat to format numbers. DecimalFormat creates for itself an instance of DecimalFormatSymbols from its locale data. If you need to change any of these symbols, you can get the DecimalFormatSymbols object from your DecimalFormat and modify it.

Summary

Constants
static Int

[icu] Indicates the currency match pattern used in getPatternForCurrencySpacing.

static Int

[icu] Indicates the insertion value used in getPatternForCurrencySpacing.

static Int

[icu] Indicates the surrounding match pattern used in getPatternForCurrencySpacing.

Public constructors

Creates a DecimalFormatSymbols object for the default FORMAT locale.

[icu] Creates a DecimalFormatSymbols object for the given locale.

Creates a DecimalFormatSymbols object for the given locale.

Public methods
open Any

Creates and returns a copy of this object.

open Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

open static DecimalFormatSymbols!

[icu] Returns a DecimalFormatSymbols instance for the given locale with digits and symbols corresponding to the given NumberingSystem.

open static DecimalFormatSymbols!

[icu] Returns a DecimalFormatSymbols instance for the given locale with digits and symbols corresponding to the given NumberingSystem.

open static Array<Locale!>!

Returns an array of all locales for which the getInstance methods of this class can return localized instances.

open static Array<ULocale!>!

[icu] Returns an array of all locales for which the getInstance methods of this class can return localized instances.

open Currency!

Returns the currency symbol, for DecimalFormatSymbols.getCurrency() API compatibility only.

open String!

Returns the string denoting the local currency.

open Char

Returns the character used for decimal sign.

open String!

[icu] Returns the string used for decimal sign.

open Char

Returns the character used for a digit in a pattern.

open Array<String!>!

[icu] Returns the array of strings used as digits, in order from 0 through 9

open CharArray!

Returns the array of characters used as digits, in order from 0 through 9

open String!

Returns the multiplication sign

open String!

[icu] Returns the string used to separate the mantissa from the exponent.

open Char

Returns the character used for grouping separator.

open String!

[icu] Returns the string used for grouping separator.

open String!

Returns the String used to represent infinity.

open static DecimalFormatSymbols!

Returns a DecimalFormatSymbols instance for the default locale.

open static DecimalFormatSymbols!
getInstance(locale: ULocale!)

Returns a DecimalFormatSymbols instance for the given locale.

open static DecimalFormatSymbols!
getInstance(locale: Locale!)

Returns a DecimalFormatSymbols instance for the given locale.

open String!

Returns the international string denoting the local currency.

open Locale!

Returns the locale for which this object was constructed.

open Char

Returns the character used to represent minus sign.

open String!

[icu] Returns the string used to represent minus sign.

open Char

Returns the monetary decimal separator.

open String!

[icu] Returns the monetary decimal separator string.

open Char

[icu] Returns the monetary grouping separator.

open String!

[icu] Returns the monetary grouping separator.

open String!

Returns the String used to represent NaN.

open Char

[icu] Returns the character used to pad numbers out to a specified width.

open String!
getPatternForCurrencySpacing(itemType: Int, beforeCurrency: Boolean)

[icu] Returns the desired currency spacing value.

open Char

Returns the character used to separate positive and negative subpatterns in a pattern.

open Char

Returns the character used for mille percent sign.

open String!

[icu] Returns the string used for permille sign.

open Char

Returns the character used for percent sign.

open String!

[icu] Returns the string used for percent sign.

open Char

[icu] Returns the localized plus sign.

open String!

[icu] Returns the string used to represent plus sign.

open Char

Returns the character used to represent a significant digit in a pattern.

open ULocale!

Returns the locale for which this object was constructed.

open Char

Returns the character used for zero.

open Int

Returns a hash code value for the object.

open Unit
setCurrency(currency: Currency!)

Sets the currency.

open Unit

Sets the string denoting the local currency.

open Unit
setDecimalSeparator(decimalSeparator: Char)

Sets the character used for decimal sign.

open Unit
setDecimalSeparatorString(decimalSeparatorString: String!)

[icu] Sets the string used for decimal sign.

open Unit
setDigit(digit: Char)

Sets the character used for a digit in a pattern.

open Unit
setDigitStrings(digitStrings: Array<String!>!)

[icu] Sets the array of strings used as digits, in order from 0 through 9

open Unit
setExponentMultiplicationSign(exponentMultiplicationSign: String!)

Sets the multiplication sign

open Unit

[icu] Sets the string used to separate the mantissa from the exponent.

open Unit
setGroupingSeparator(groupingSeparator: Char)

Sets the character used for grouping separator.

open Unit
setGroupingSeparatorString(groupingSeparatorString: String!)

[icu] Sets the string used for grouping separator.

open Unit
setInfinity(infinity: String!)

Sets the String used to represent infinity.

open Unit

Sets the international string denoting the local currency.

open Unit
setMinusSign(minusSign: Char)

Sets the character used to represent minus sign.

open Unit
setMinusSignString(minusSignString: String!)

[icu] Sets the string used to represent minus sign.

open Unit

Sets the monetary decimal separator.

open Unit

[icu] Sets the monetary decimal separator string.

open Unit

[icu] Sets the monetary grouping separator.

open Unit

[icu] Sets the monetary grouping separator string.

open Unit
setNaN(NaN: String!)

Sets the String used to represent NaN.

open Unit

[icu] Sets the character used to pad numbers out to a specified width.

open Unit
setPatternForCurrencySpacing(itemType: Int, beforeCurrency: Boolean, pattern: String!)

[icu] Sets the indicated currency spacing pattern or value.

open Unit
setPatternSeparator(patternSeparator: Char)

Sets the character used to separate positive and negative subpatterns in a pattern.

open Unit
setPerMill(perMill: Char)

Sets the character used for mille percent sign.

open Unit
setPerMillString(perMillString: String!)

[icu] Sets the string used for permille sign.

open Unit
setPercent(percent: Char)

Sets the character used for percent sign.

open Unit
setPercentString(percentString: String!)

[icu] Sets the string used for percent sign.

open Unit

[icu] Sets the localized plus sign.

open Unit
setPlusSignString(plusSignString: String!)

[icu] Sets the localized plus sign string.

open Unit

Sets the character used to represent a significant digit in a pattern.

open Unit
setZeroDigit(zeroDigit: Char)

Sets the character used for zero.

Constants

CURRENCY_SPC_CURRENCY_MATCH

Added in API level 24
static val CURRENCY_SPC_CURRENCY_MATCH: Int

[icu] Indicates the currency match pattern used in getPatternForCurrencySpacing.

Value: 0

CURRENCY_SPC_INSERT

Added in API level 24
static val CURRENCY_SPC_INSERT: Int

[icu] Indicates the insertion value used in getPatternForCurrencySpacing.

Value: 2

CURRENCY_SPC_SURROUNDING_MATCH

Added in API level 24
static val CURRENCY_SPC_SURROUNDING_MATCH: Int

[icu] Indicates the surrounding match pattern used in getPatternForCurrencySpacing.

Value: 1

Public constructors

DecimalFormatSymbols

Added in API level 24
DecimalFormatSymbols()

Creates a DecimalFormatSymbols object for the default FORMAT locale.

DecimalFormatSymbols

Added in API level 24
DecimalFormatSymbols(locale: ULocale!)

[icu] Creates a DecimalFormatSymbols object for the given locale.

Parameters
locale ULocale!: the locale

DecimalFormatSymbols

Added in API level 24
DecimalFormatSymbols(locale: Locale!)

Creates a DecimalFormatSymbols object for the given locale.

Parameters
locale Locale!: the locale

Public methods

clone

Added in API level 24
open fun clone(): Any

Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:

x.clone() != x
will be true, and that the expression:
x.clone().getClass() == x.getClass()
will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)
will be true, this is not an absolute requirement.

By convention, the returned object should be obtained by calling super.clone. If a class and all of its superclasses (except Object) obey this convention, it will be the case that x.clone().getClass() == x.getClass().

By convention, the object returned by this method should be independent of this object (which is being cloned). To achieve this independence, it may be necessary to modify one or more fields of the object returned by super.clone before returning it. Typically, this means copying any mutable objects that comprise the internal "deep structure" of the object being cloned and replacing the references to these objects with references to the copies. If a class contains only primitive fields or references to immutable objects, then it is usually the case that no fields in the object returned by super.clone need to be modified.

Return
Any a clone of this instance.
Exceptions
java.lang.CloneNotSupportedException if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

equals

Added in API level 24
open fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj the reference object with which to compare.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

forNumberingSystem

Added in API level 29
open static fun forNumberingSystem(
    locale: ULocale!,
    ns: NumberingSystem!
): DecimalFormatSymbols!

[icu] Returns a DecimalFormatSymbols instance for the given locale with digits and symbols corresponding to the given NumberingSystem.

This method behaves equivalently to #getInstance called with a locale having a "numbers=xxxx" keyword specifying the numbering system by name.

In this method, the NumberingSystem argument will be used even if the locale has its own "numbers=xxxx" keyword.

Parameters
locale ULocale!: the locale.
ns NumberingSystem!: the numbering system.
Return
DecimalFormatSymbols! A DecimalFormatSymbols instance.

forNumberingSystem

Added in API level 29
open static fun forNumberingSystem(
    locale: Locale!,
    ns: NumberingSystem!
): DecimalFormatSymbols!

[icu] Returns a DecimalFormatSymbols instance for the given locale with digits and symbols corresponding to the given NumberingSystem.

This method behaves equivalently to #getInstance called with a locale having a "numbers=xxxx" keyword specifying the numbering system by name.

In this method, the NumberingSystem argument will be used even if the locale has its own "numbers=xxxx" keyword.

Parameters
locale Locale!: the locale.
ns NumberingSystem!: the numbering system.
Return
DecimalFormatSymbols! A DecimalFormatSymbols instance.

getAvailableLocales

Added in API level 24
open static fun getAvailableLocales(): Array<Locale!>!

Returns an array of all locales for which the getInstance methods of this class can return localized instances.

Note: Unlike java.text.DecimalFormatSymbols#getAvailableLocales, this method simply returns the array of Locales available for this class. ICU currently does not support DecimalFormatSymbolsProvider, which was introduced in Java 6.

Return
Array<Locale!>! An array of Locales for which localized DecimalFormatSymbols instances are available.

getAvailableULocales

Added in API level 33
open static fun getAvailableULocales(): Array<ULocale!>!

[icu] Returns an array of all locales for which the getInstance methods of this class can return localized instances.

Note: Unlike java.text.DecimalFormatSymbols#getAvailableLocales, this method simply returns the array of ULocales available in this class. ICU currently does not support DecimalFormatSymbolsProvider, which was introduced in Java 6.

Return
Array<ULocale!>! An array of ULocales for which localized DecimalFormatSymbols instances are available.

getCurrency

Added in API level 24
open fun getCurrency(): Currency!

Returns the currency symbol, for DecimalFormatSymbols.getCurrency() API compatibility only. ICU clients should use the Currency API directly.

Return
Currency! the currency used, or null

getCurrencySymbol

Added in API level 24
open fun getCurrencySymbol(): String!

Returns the string denoting the local currency.

Return
String! the local currency String.

getDecimalSeparator

Added in API level 24
open fun getDecimalSeparator(): Char

Returns the character used for decimal sign. Different for French, etc.

Return
Char the decimal character

getDecimalSeparatorString

Added in API level 28
open fun getDecimalSeparatorString(): String!

[icu] Returns the string used for decimal sign.

Return
String! the decimal sign string

getDigit

Added in API level 24
open fun getDigit(): Char

Returns the character used for a digit in a pattern.

Return
Char the digit pattern character

getDigitStrings

Added in API level 28
open fun getDigitStrings(): Array<String!>!

[icu] Returns the array of strings used as digits, in order from 0 through 9

Return
Array<String!>! The array of ten digit strings

getDigits

Added in API level 24
open fun getDigits(): CharArray!

Returns the array of characters used as digits, in order from 0 through 9

Return
CharArray! The array

getExponentMultiplicationSign

Added in API level 24
open fun getExponentMultiplicationSign(): String!

Returns the multiplication sign

getExponentSeparator

Added in API level 24
open fun getExponentSeparator(): String!

[icu] Returns the string used to separate the mantissa from the exponent. Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.

Return
String! the localized exponent symbol, used in localized patterns and formatted strings

getGroupingSeparator

Added in API level 24
open fun getGroupingSeparator(): Char

Returns the character used for grouping separator. Different for French, etc.

Return
Char the thousands character

getGroupingSeparatorString

Added in API level 28
open fun getGroupingSeparatorString(): String!

[icu] Returns the string used for grouping separator. Different for French, etc.

Return
String! the grouping separator string

getInfinity

Added in API level 24
open fun getInfinity(): String!

Returns the String used to represent infinity. Almost always left unchanged.

Return
String! the Infinity string

getInstance

Added in API level 24
open static fun getInstance(): DecimalFormatSymbols!

Returns a DecimalFormatSymbols instance for the default locale.

Note: Unlike java.text.DecimalFormatSymbols#getInstance, this method simply returns new android.icu.text.DecimalFormatSymbols(). ICU currently does not support DecimalFormatSymbolsProvider, which was introduced in Java 6.

Return
DecimalFormatSymbols! A DecimalFormatSymbols instance.

getInstance

Added in API level 24
open static fun getInstance(locale: ULocale!): DecimalFormatSymbols!

Returns a DecimalFormatSymbols instance for the given locale.

Note: Unlike java.text.DecimalFormatSymbols#getInstance, this method simply returns new android.icu.text.DecimalFormatSymbols(locale). ICU currently does not support DecimalFormatSymbolsProvider, which was introduced in Java 6.

Parameters
locale ULocale!: the locale.
Return
DecimalFormatSymbols! A DecimalFormatSymbols instance.

getInstance

Added in API level 24
open static fun getInstance(locale: Locale!): DecimalFormatSymbols!

Returns a DecimalFormatSymbols instance for the given locale.

Note: Unlike java.text.DecimalFormatSymbols#getInstance, this method simply returns new android.icu.text.DecimalFormatSymbols(locale). ICU currently does not support DecimalFormatSymbolsProvider, which was introduced in Java 6.

Parameters
locale Locale!: the locale.
Return
DecimalFormatSymbols! A DecimalFormatSymbols instance.

getInternationalCurrencySymbol

Added in API level 24
open fun getInternationalCurrencySymbol(): String!

Returns the international string denoting the local currency.

Return
String! the international string denoting the local currency

getLocale

Added in API level 24
open fun getLocale(): Locale!

Returns the locale for which this object was constructed.

Return
Locale! the locale for which this object was constructed

getMinusSign

Added in API level 24
open fun getMinusSign(): Char

Returns the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format.

Return
Char the minus sign character

getMinusSignString

Added in API level 28
open fun getMinusSignString(): String!

[icu] Returns the string used to represent minus sign.

Return
String! the minus sign string

getMonetaryDecimalSeparator

Added in API level 24
open fun getMonetaryDecimalSeparator(): Char

Returns the monetary decimal separator.

Return
Char the monetary decimal separator character

getMonetaryDecimalSeparatorString

Added in API level 28
open fun getMonetaryDecimalSeparatorString(): String!

[icu] Returns the monetary decimal separator string.

Return
String! the monetary decimal separator string

getMonetaryGroupingSeparator

Added in API level 24
open fun getMonetaryGroupingSeparator(): Char

[icu] Returns the monetary grouping separator.

Return
Char the monetary grouping separator character

getMonetaryGroupingSeparatorString

Added in API level 28
open fun getMonetaryGroupingSeparatorString(): String!

[icu] Returns the monetary grouping separator.

Return
String! the monetary grouping separator string

getNaN

Added in API level 24
open fun getNaN(): String!

Returns the String used to represent NaN. Almost always left unchanged.

Return
String! the NaN String

getPadEscape

Added in API level 24
open fun getPadEscape(): Char

[icu] Returns the character used to pad numbers out to a specified width. This is not the pad character itself; rather, it is the special pattern character preceding the pad character. In the pattern "*_#,##0", '*' is the pad escape, and '_' is the pad character.

Return
Char the character

getPatternForCurrencySpacing

Added in API level 24
open fun getPatternForCurrencySpacing(
    itemType: Int,
    beforeCurrency: Boolean
): String!

[icu] Returns the desired currency spacing value. Original values come from ICU's CLDR data based on the locale provided during construction, and can be null. These values govern what and when text is inserted between a currency code/name/symbol and the currency amount when formatting money.

For more information, see UTS#35 section 5.10.2.

Parameters
itemType Int: one of CURRENCY_SPC_CURRENCY_MATCH, CURRENCY_SPC_SURROUNDING_MATCH or CURRENCY_SPC_INSERT
beforeCurrency Boolean: true to get the beforeCurrency values, false to get the afterCurrency values.
Return
String! the value, or null.

getPatternSeparator

Added in API level 24
open fun getPatternSeparator(): Char

Returns the character used to separate positive and negative subpatterns in a pattern.

Return
Char the pattern separator character

getPerMill

Added in API level 24
open fun getPerMill(): Char

Returns the character used for mille percent sign. Different for Arabic, etc.

Return
Char the mille percent character

getPerMillString

Added in API level 28
open fun getPerMillString(): String!

[icu] Returns the string used for permille sign.

Return
String! the permille string

getPercent

Added in API level 24
open fun getPercent(): Char

Returns the character used for percent sign. Different for Arabic, etc.

Return
Char the percent character

getPercentString

Added in API level 28
open fun getPercentString(): String!

[icu] Returns the string used for percent sign.

Return
String! the percent string

getPlusSign

Added in API level 24
open fun getPlusSign(): Char

[icu] Returns the localized plus sign.

Return
Char the plus sign, used in localized patterns and formatted strings

getPlusSignString

Added in API level 28
open fun getPlusSignString(): String!

[icu] Returns the string used to represent plus sign.

Return
String! the plus sign string

getSignificantDigit

Added in API level 24
open fun getSignificantDigit(): Char

Returns the character used to represent a significant digit in a pattern.

Return
Char the significant digit pattern character

getULocale

Added in API level 24
open fun getULocale(): ULocale!

Returns the locale for which this object was constructed.

Return
ULocale! the locale for which this object was constructed

getZeroDigit

Added in API level 24
open fun getZeroDigit(): Char

Returns the character used for zero. Different for Arabic, etc.

Return
Char the character

hashCode

Added in API level 24
open fun hashCode(): Int

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Return
Int a hash code value for this object.

setCurrency

Added in API level 24
open fun setCurrency(currency: Currency!): Unit

Sets the currency.

Note: ICU does not use the DecimalFormatSymbols for the currency any more. This API is present for API compatibility only.

This also sets the currency symbol attribute to the currency's symbol in the DecimalFormatSymbols' locale, and the international currency symbol attribute to the currency's ISO 4217 currency code.

Parameters
currency Currency!: the new currency to be used
Exceptions
java.lang.NullPointerException if currency is null

setCurrencySymbol

Added in API level 24
open fun setCurrencySymbol(currency: String!): Unit

Sets the string denoting the local currency.

Parameters
currency String!: the local currency String.

setDecimalSeparator

Added in API level 24
open fun setDecimalSeparator(decimalSeparator: Char): Unit

Sets the character used for decimal sign. Different for French, etc.

Parameters
decimalSeparator Char: the decimal character

setDecimalSeparatorString

Added in API level 28
open fun setDecimalSeparatorString(decimalSeparatorString: String!): Unit

[icu] Sets the string used for decimal sign.

Note: When the input decimal separator String is represented by multiple Java chars, then getDecimalSeparator() will return the default decimal separator character ('.').

Parameters
decimalSeparatorString String!: the decimal sign string
Exceptions
java.lang.NullPointerException if decimalSeparatorString is null.

setDigit

Added in API level 24
open fun setDigit(digit: Char): Unit

Sets the character used for a digit in a pattern.

Parameters
digit Char: the digit pattern character

setDigitStrings

Added in API level 28
open fun setDigitStrings(digitStrings: Array<String!>!): Unit

[icu] Sets the array of strings used as digits, in order from 0 through 9

Note:

When the input array of digit strings contains any strings represented by multiple Java chars, then getDigits() will return the default digits ('0' - '9') and getZeroDigit() will return the default zero digit ('0').

Parameters
digitStrings Array<String!>!: The array of digit strings. The length of the array must be exactly 10.
Exceptions
java.lang.NullPointerException if the digitStrings is null.
java.lang.IllegalArgumentException if the length of the array is not 10.

setExponentMultiplicationSign

Added in API level 24
open fun setExponentMultiplicationSign(exponentMultiplicationSign: String!): Unit

Sets the multiplication sign

setExponentSeparator

Added in API level 24
open fun setExponentSeparator(exp: String!): Unit

[icu] Sets the string used to separate the mantissa from the exponent. Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.

Parameters
exp String!: the localized exponent symbol, used in localized patterns and formatted strings

setGroupingSeparator

Added in API level 24
open fun setGroupingSeparator(groupingSeparator: Char): Unit

Sets the character used for grouping separator. Different for French, etc.

Parameters
groupingSeparator Char: the thousands character

setGroupingSeparatorString

Added in API level 28
open fun setGroupingSeparatorString(groupingSeparatorString: String!): Unit

[icu] Sets the string used for grouping separator.

Note: When the input grouping separator String is represented by multiple Java chars, then getGroupingSeparator() will return the default grouping separator character (',').

Parameters
groupingSeparatorString String!: the grouping separator string
Exceptions
java.lang.NullPointerException if groupingSeparatorString is null.

setInfinity

Added in API level 24
open fun setInfinity(infinity: String!): Unit

Sets the String used to represent infinity. Almost always left unchanged.

Parameters
infinity String!: the Infinity String

setInternationalCurrencySymbol

Added in API level 24
open fun setInternationalCurrencySymbol(currency: String!): Unit

Sets the international string denoting the local currency.

Parameters
currency String!: the international string denoting the local currency.

setMinusSign

Added in API level 24
open fun setMinusSign(minusSign: Char): Unit

Sets the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format.

Parameters
minusSign Char: the minus sign character

setMinusSignString

Added in API level 28
open fun setMinusSignString(minusSignString: String!): Unit

[icu] Sets the string used to represent minus sign.

Note: When the input minus sign String is represented by multiple Java chars, then getMinusSign() will return the default minus sign character ('-').

Parameters
minusSignString String!: the minus sign string
Exceptions
java.lang.NullPointerException if minusSignString is null.

setMonetaryDecimalSeparator

Added in API level 24
open fun setMonetaryDecimalSeparator(sep: Char): Unit

Sets the monetary decimal separator.

Parameters
sep Char: the monetary decimal separator character

setMonetaryDecimalSeparatorString

Added in API level 28
open fun setMonetaryDecimalSeparatorString(sep: String!): Unit

[icu] Sets the monetary decimal separator string.

Note: When the input monetary decimal separator String is represented by multiple Java chars, then getMonetaryDecimalSeparatorString() will return the default monetary decimal separator character ('.').

Parameters
sep String!: the monetary decimal separator string
Exceptions
java.lang.NullPointerException if sep is null.

setMonetaryGroupingSeparator

Added in API level 24
open fun setMonetaryGroupingSeparator(sep: Char): Unit

[icu] Sets the monetary grouping separator.

Parameters
sep Char: the monetary grouping separator character

setMonetaryGroupingSeparatorString

Added in API level 28
open fun setMonetaryGroupingSeparatorString(sep: String!): Unit

[icu] Sets the monetary grouping separator string.

Note: When the input grouping separator String is represented by multiple Java chars, then getMonetaryGroupingSeparator() will return the default monetary grouping separator character (',').

Parameters
sep String!: the monetary grouping separator string
Exceptions
java.lang.NullPointerException if sep is null.

setNaN

Added in API level 24
open fun setNaN(NaN: String!): Unit

Sets the String used to represent NaN. Almost always left unchanged.

Parameters
NaN String!: the NaN String

setPadEscape

Added in API level 24
open fun setPadEscape(c: Char): Unit

[icu] Sets the character used to pad numbers out to a specified width. This is not the pad character itself; rather, it is the special pattern character preceding the pad character. In the pattern "*_#,##0", '*' is the pad escape, and '_' is the pad character.

setPatternForCurrencySpacing

Added in API level 24
open fun setPatternForCurrencySpacing(
    itemType: Int,
    beforeCurrency: Boolean,
    pattern: String!
): Unit

[icu] Sets the indicated currency spacing pattern or value. See getPatternForCurrencySpacing for more information.

Values for currency match and surrounding match must be patterns. Values for insert can be any string.

Note: ICU4J does not currently use this information.

Parameters
itemType Int: one of CURRENCY_SPC_CURRENCY_MATCH, CURRENCY_SPC_SURROUNDING_MATCH or CURRENCY_SPC_INSERT
beforeCurrency Boolean: true if the pattern is for before the currency symbol. false if the pattern is for after it.
pattern String!: string to override current setting; can be null.

setPatternSeparator

Added in API level 24
open fun setPatternSeparator(patternSeparator: Char): Unit

Sets the character used to separate positive and negative subpatterns in a pattern.

Parameters
patternSeparator Char: the pattern separator character

setPerMill

Added in API level 24
open fun setPerMill(perMill: Char): Unit

Sets the character used for mille percent sign. Different for Arabic, etc.

Parameters
perMill Char: the mille percent character

setPerMillString

Added in API level 28
open fun setPerMillString(perMillString: String!): Unit

[icu] Sets the string used for permille sign.

Note: When the input permille String is represented by multiple Java chars, then getPerMill() will return the default permille character ('‰').

Parameters
perMillString String!: the permille string
Exceptions
java.lang.NullPointerException if perMillString is null.

setPercent

Added in API level 24
open fun setPercent(percent: Char): Unit

Sets the character used for percent sign. Different for Arabic, etc.

Parameters
percent Char: the percent character

setPercentString

Added in API level 28
open fun setPercentString(percentString: String!): Unit

[icu] Sets the string used for percent sign.

Note: When the input grouping separator String is represented by multiple Java chars, then getPercent() will return the default percent sign character ('%').

Parameters
percentString String!: the percent string
Exceptions
java.lang.NullPointerException if percentString is null.

setPlusSign

Added in API level 24
open fun setPlusSign(plus: Char): Unit

[icu] Sets the localized plus sign.

Parameters
plus Char: the plus sign, used in localized patterns and formatted strings

setPlusSignString

Added in API level 28
open fun setPlusSignString(plusSignString: String!): Unit

[icu] Sets the localized plus sign string.

Note: When the input plus sign String is represented by multiple Java chars, then getPlusSign() will return the default plus sign character ('+').

Parameters
plusSignString String!: the plus sign string, used in localized patterns and formatted strings
Exceptions
java.lang.NullPointerException if plusSignString is null.

setSignificantDigit

Added in API level 24
open fun setSignificantDigit(sigDigit: Char): Unit

Sets the character used to represent a significant digit in a pattern.

Parameters
sigDigit Char: the significant digit pattern character

setZeroDigit

Added in API level 24
open fun setZeroDigit(zeroDigit: Char): Unit

Sets the character used for zero.

Note: This method propagates digit 1 to digit 9 by incrementing code point one by one.

Parameters
zeroDigit Char: the zero character.