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 |
static Int |
[icu] Indicates the insertion value used in |
static Int |
[icu] Indicates the surrounding match pattern used in |
Public constructors | |
---|---|
Creates a DecimalFormatSymbols object for the default |
|
DecimalFormatSymbols(locale: Locale!) Creates a DecimalFormatSymbols object for the given locale. |
|
DecimalFormatSymbols(locale: ULocale!) [icu] Creates a DecimalFormatSymbols object for the given locale. |
Public methods | |
---|---|
open Any |
clone() Creates and returns a copy of this object. |
open Boolean |
Indicates whether some other object is "equal to" this one. |
open static DecimalFormatSymbols! |
forNumberingSystem(locale: Locale!, ns: NumberingSystem!) [icu] Returns a DecimalFormatSymbols instance for the given locale with digits and symbols corresponding to the given |
open static DecimalFormatSymbols! |
forNumberingSystem(locale: ULocale!, ns: NumberingSystem!) [icu] Returns a DecimalFormatSymbols instance for the given locale with digits and symbols corresponding to the given |
open static Array<Locale!>! |
Returns an array of all locales for which the |
open static Array<ULocale!>! |
[icu] Returns an array of all locales for which the |
open Currency! |
Returns the currency symbol, for |
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 |
getDigit() 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: Locale!) Returns a DecimalFormatSymbols instance for the given locale. |
open static DecimalFormatSymbols! |
getInstance(locale: ULocale!) 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! |
getNaN() 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 |
hashCode() Returns a hash code value for the object. |
open Unit |
setCurrency(currency: Currency!) Sets the currency. |
open Unit |
setCurrencySymbol(currency: String!) 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 |
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 |
setExponentSeparator(exp: String!) [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 |
setInternationalCurrencySymbol(currency: String!) 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 |
Sets the String used to represent NaN. |
open Unit |
setPadEscape(c: Char) [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 |
setPlusSign(plus: Char) [icu] Sets the localized plus sign. |
open Unit |
setPlusSignString(plusSignString: String!) [icu] Sets the localized plus sign string. |
open Unit |
setSignificantDigit(sigDigit: Char) 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
static val CURRENCY_SPC_CURRENCY_MATCH: Int
[icu] Indicates the currency match pattern used in getPatternForCurrencySpacing
.
Value: 0
CURRENCY_SPC_INSERT
static val CURRENCY_SPC_INSERT: Int
[icu] Indicates the insertion value used in getPatternForCurrencySpacing
.
Value: 2
CURRENCY_SPC_SURROUNDING_MATCH
static val CURRENCY_SPC_SURROUNDING_MATCH: Int
[icu] Indicates the surrounding match pattern used in getPatternForCurrencySpacing
.
Value: 1
Public constructors
DecimalFormatSymbols
DecimalFormatSymbols()
Creates a DecimalFormatSymbols object for the default FORMAT
locale.
DecimalFormatSymbols
DecimalFormatSymbols(locale: Locale!)
Creates a DecimalFormatSymbols object for the given locale.
Parameters | |
---|---|
locale |
Locale!: the locale |
DecimalFormatSymbols
DecimalFormatSymbols(locale: ULocale!)
[icu] Creates a DecimalFormatSymbols object for the given locale.
Parameters | |
---|---|
locale |
ULocale!: the locale |
Public methods
clone
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() != xwill 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
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 returntrue
. - It is symmetric: for any non-null reference values
x
andy
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any non-null reference values
x
,y
, andz
, ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
. - It is consistent: for any non-null reference values
x
andy
, multiple invocations ofx.equals(y)
consistently returntrue
or consistently returnfalse
, provided no information used inequals
comparisons on the objects is modified. - For any non-null reference value
x
,x.equals(null)
should returnfalse
.
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
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. |
forNumberingSystem
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. |
getAvailableLocales
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 Locale
s available for this class. ICU currently does not support DecimalFormatSymbolsProvider
, which was introduced in Java 6.
Return | |
---|---|
Array<Locale!>! |
An array of Locale s for which localized DecimalFormatSymbols instances are available. |
getAvailableULocales
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 ULocale
s available in this class. ICU currently does not support DecimalFormatSymbolsProvider
, which was introduced in Java 6.
Return | |
---|---|
Array<ULocale!>! |
An array of ULocale s for which localized DecimalFormatSymbols instances are available. |
getCurrency
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
open fun getCurrencySymbol(): String!
Returns the string denoting the local currency.
Return | |
---|---|
String! |
the local currency String. |
getDecimalSeparator
open fun getDecimalSeparator(): Char
Returns the character used for decimal sign. Different for French, etc.
Return | |
---|---|
Char |
the decimal character |
getDecimalSeparatorString
open fun getDecimalSeparatorString(): String!
[icu] Returns the string used for decimal sign.
Return | |
---|---|
String! |
the decimal sign string |
See Also
getDigit
open fun getDigit(): Char
Returns the character used for a digit in a pattern.
Return | |
---|---|
Char |
the digit pattern character |
getDigitStrings
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 |
See Also
getDigits
open fun getDigits(): CharArray!
Returns the array of characters used as digits, in order from 0 through 9
Return | |
---|---|
CharArray! |
The array |
See Also
getExponentMultiplicationSign
open fun getExponentMultiplicationSign(): String!
Returns the multiplication sign
getExponentSeparator
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 |
See Also
getGroupingSeparator
open fun getGroupingSeparator(): Char
Returns the character used for grouping separator. Different for French, etc.
Return | |
---|---|
Char |
the thousands character |
getGroupingSeparatorString
open fun getGroupingSeparatorString(): String!
[icu] Returns the string used for grouping separator. Different for French, etc.
Return | |
---|---|
String! |
the grouping separator string |
See Also
getInfinity
open fun getInfinity(): String!
Returns the String used to represent infinity. Almost always left unchanged.
Return | |
---|---|
String! |
the Infinity string |
getInstance
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
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. |
getInstance
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. |
getInternationalCurrencySymbol
open fun getInternationalCurrencySymbol(): String!
Returns the international string denoting the local currency.
Return | |
---|---|
String! |
the international string denoting the local currency |
getLocale
open fun getLocale(): Locale!
Returns the locale for which this object was constructed.
Return | |
---|---|
Locale! |
the locale for which this object was constructed |
getMinusSign
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
open fun getMinusSignString(): String!
[icu] Returns the string used to represent minus sign.
Return | |
---|---|
String! |
the minus sign string |
See Also
getMonetaryDecimalSeparator
open fun getMonetaryDecimalSeparator(): Char
Returns the monetary decimal separator.
Return | |
---|---|
Char |
the monetary decimal separator character |
getMonetaryDecimalSeparatorString
open fun getMonetaryDecimalSeparatorString(): String!
[icu] Returns the monetary decimal separator string.
Return | |
---|---|
String! |
the monetary decimal separator string |
getMonetaryGroupingSeparator
open fun getMonetaryGroupingSeparator(): Char
[icu] Returns the monetary grouping separator.
Return | |
---|---|
Char |
the monetary grouping separator character |
getMonetaryGroupingSeparatorString
open fun getMonetaryGroupingSeparatorString(): String!
[icu] Returns the monetary grouping separator.
Return | |
---|---|
String! |
the monetary grouping separator string |
getNaN
open fun getNaN(): String!
Returns the String used to represent NaN. Almost always left unchanged.
Return | |
---|---|
String! |
the NaN String |
getPadEscape
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
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
open fun getPatternSeparator(): Char
Returns the character used to separate positive and negative subpatterns in a pattern.
Return | |
---|---|
Char |
the pattern separator character |
getPerMill
open fun getPerMill(): Char
Returns the character used for mille percent sign. Different for Arabic, etc.
Return | |
---|---|
Char |
the mille percent character |
getPerMillString
open fun getPerMillString(): String!
[icu] Returns the string used for permille sign.
Return | |
---|---|
String! |
the permille string |
See Also
getPercent
open fun getPercent(): Char
Returns the character used for percent sign. Different for Arabic, etc.
Return | |
---|---|
Char |
the percent character |
getPercentString
open fun getPercentString(): String!
[icu] Returns the string used for percent sign.
Return | |
---|---|
String! |
the percent string |
See Also
getPlusSign
open fun getPlusSign(): Char
[icu] Returns the localized plus sign.
Return | |
---|---|
Char |
the plus sign, used in localized patterns and formatted strings |
See Also
getPlusSignString
open fun getPlusSignString(): String!
[icu] Returns the string used to represent plus sign.
Return | |
---|---|
String! |
the plus sign string |
getSignificantDigit
open fun getSignificantDigit(): Char
Returns the character used to represent a significant digit in a pattern.
Return | |
---|---|
Char |
the significant digit pattern character |
getULocale
open fun getULocale(): ULocale!
Returns the locale for which this object was constructed.
Return | |
---|---|
ULocale! |
the locale for which this object was constructed |
getZeroDigit
open fun getZeroDigit(): Char
Returns the character used for zero. Different for Arabic, etc.
Return | |
---|---|
Char |
the character |
hashCode
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 inequals
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 thehashCode
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 thehashCode
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
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
open fun setCurrencySymbol(currency: String!): Unit
Sets the string denoting the local currency.
Parameters | |
---|---|
currency |
String!: the local currency String. |
setDecimalSeparator
open fun setDecimalSeparator(decimalSeparator: Char): Unit
Sets the character used for decimal sign. Different for French, etc.
Parameters | |
---|---|
decimalSeparator |
Char: the decimal character |
setDecimalSeparatorString
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. |
See Also
setDigit
open fun setDigit(digit: Char): Unit
Sets the character used for a digit in a pattern.
Parameters | |
---|---|
digit |
Char: the digit pattern character |
setDigitStrings
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. |
See Also
setExponentMultiplicationSign
open fun setExponentMultiplicationSign(exponentMultiplicationSign: String!): Unit
Sets the multiplication sign
setExponentSeparator
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 |
See Also
setGroupingSeparator
open fun setGroupingSeparator(groupingSeparator: Char): Unit
Sets the character used for grouping separator. Different for French, etc.
Parameters | |
---|---|
groupingSeparator |
Char: the thousands character |
See Also
setGroupingSeparatorString
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. |
See Also
setInfinity
open fun setInfinity(infinity: String!): Unit
Sets the String used to represent infinity. Almost always left unchanged.
Parameters | |
---|---|
infinity |
String!: the Infinity String |
setInternationalCurrencySymbol
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
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
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. |
See Also
setMonetaryDecimalSeparator
open fun setMonetaryDecimalSeparator(sep: Char): Unit
Sets the monetary decimal separator.
Parameters | |
---|---|
sep |
Char: the monetary decimal separator character |
setMonetaryDecimalSeparatorString
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. |
See Also
setMonetaryGroupingSeparator
open fun setMonetaryGroupingSeparator(sep: Char): Unit
[icu] Sets the monetary grouping separator.
Parameters | |
---|---|
sep |
Char: the monetary grouping separator character |
setMonetaryGroupingSeparatorString
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
open fun setNaN(NaN: String!): Unit
Sets the String used to represent NaN. Almost always left unchanged.
Parameters | |
---|---|
NaN |
String!: the NaN String |
setPadEscape
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
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
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
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
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. |
See Also
setPercent
open fun setPercent(percent: Char): Unit
Sets the character used for percent sign. Different for Arabic, etc.
Parameters | |
---|---|
percent |
Char: the percent character |
setPercentString
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. |
See Also
setPlusSign
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 |
See Also
setPlusSignString
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. |
See Also
setSignificantDigit
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
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. |