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.
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.
(*get-available-locales)
Returns an array of all locales for which the 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 DecimalFormatSymbolsProvider implementations. It must contain at least a Locale instance equal to Locale.US.
returns: an array of locales for which localized
DecimalFormatSymbols instances are available. - java.util.Locale[]
Returns an array of all locales for which the 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 DecimalFormatSymbolsProvider implementations. It must contain at least a Locale instance equal to Locale.US. returns: an array of locales for which localized DecimalFormatSymbols instances are available. - `java.util.Locale[]`
(*get-instance)
(*get-instance locale)
Gets the DecimalFormatSymbols instance for the specified locale. This method provides access to DecimalFormatSymbols instances for locales supported by the Java runtime itself as well as for those supported by installed DecimalFormatSymbolsProvider implementations. If the specified locale contains the Locale.UNICODE_LOCALE_EXTENSION for the numbering system, the instance is initialized with the specified numbering system if the JRE implementation supports it. For example,
NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) This may return a NumberFormat instance with the Thai numbering system, instead of the Latin numbering system.
locale - the desired locale. - java.util.Locale
returns: a DecimalFormatSymbols instance. - java.text.DecimalFormatSymbols
throws: java.lang.NullPointerException - if locale is null
Gets the DecimalFormatSymbols instance for the specified locale. This method provides access to DecimalFormatSymbols instances for locales supported by the Java runtime itself as well as for those supported by installed DecimalFormatSymbolsProvider implementations. If the specified locale contains the Locale.UNICODE_LOCALE_EXTENSION for the numbering system, the instance is initialized with the specified numbering system if the JRE implementation supports it. For example, NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) This may return a NumberFormat instance with the Thai numbering system, instead of the Latin numbering system. locale - the desired locale. - `java.util.Locale` returns: a DecimalFormatSymbols instance. - `java.text.DecimalFormatSymbols` throws: java.lang.NullPointerException - if locale is null
(->decimal-format-symbols)
(->decimal-format-symbols locale)
Constructor.
Create a DecimalFormatSymbols object for the given locale. This constructor can only construct instances for the locales supported by the Java runtime environment, not for those supported by installed DecimalFormatSymbolsProvider implementations. For full locale coverage, use the getInstance method. If the specified locale contains the Locale.UNICODE_LOCALE_EXTENSION for the numbering system, the instance is initialized with the specified numbering system if the JRE implementation supports it. For example,
NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) This may return a NumberFormat instance with the Thai numbering system, instead of the Latin numbering system.
locale - the desired locale - java.util.Locale
throws: java.lang.NullPointerException - if locale is null
Constructor. Create a DecimalFormatSymbols object for the given locale. This constructor can only construct instances for the locales supported by the Java runtime environment, not for those supported by installed DecimalFormatSymbolsProvider implementations. For full locale coverage, use the getInstance method. If the specified locale contains the Locale.UNICODE_LOCALE_EXTENSION for the numbering system, the instance is initialized with the specified numbering system if the JRE implementation supports it. For example, NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) This may return a NumberFormat instance with the Thai numbering system, instead of the Latin numbering system. locale - the desired locale - `java.util.Locale` throws: java.lang.NullPointerException - if locale is null
(clone this)
Standard override.
returns: a clone of this instance. - java.lang.Object
Standard override. returns: a clone of this instance. - `java.lang.Object`
(equals this obj)
Override equals.
obj - the reference object with which to compare. - java.lang.Object
returns: true if this object is the same as the obj
argument; false otherwise. - boolean
Override equals. obj - the reference object with which to compare. - `java.lang.Object` returns: true if this object is the same as the obj argument; false otherwise. - `boolean`
(get-currency this)
Gets the currency of these DecimalFormatSymbols. May be null if the currency symbol attribute was previously set to a value that's not a valid ISO 4217 currency code.
returns: the currency used, or null - java.util.Currency
Gets the currency of these DecimalFormatSymbols. May be null if the currency symbol attribute was previously set to a value that's not a valid ISO 4217 currency code. returns: the currency used, or null - `java.util.Currency`
(get-currency-symbol this)
Returns the currency symbol for the currency of these DecimalFormatSymbols in their locale.
returns: the currency symbol - java.lang.String
Returns the currency symbol for the currency of these DecimalFormatSymbols in their locale. returns: the currency symbol - `java.lang.String`
(get-decimal-separator this)
Gets the character used for decimal sign. Different for French, etc.
returns: the character used for decimal sign - char
Gets the character used for decimal sign. Different for French, etc. returns: the character used for decimal sign - `char`
(get-digit this)
Gets the character used for a digit in a pattern.
returns: the character used for a digit in a pattern - char
Gets the character used for a digit in a pattern. returns: the character used for a digit in a pattern - `char`
(get-exponent-separator this)
Returns the string used to separate the mantissa from the exponent. Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
returns: the exponent separator string - java.lang.String
Returns the string used to separate the mantissa from the exponent. Examples: "x10^" for 1.23x10^4, "E" for 1.23E4. returns: the exponent separator string - `java.lang.String`
(get-grouping-separator this)
Gets the character used for thousands separator. Different for French, etc.
returns: the grouping separator - char
Gets the character used for thousands separator. Different for French, etc. returns: the grouping separator - `char`
(get-infinity this)
Gets the string used to represent infinity. Almost always left unchanged.
returns: the string representing infinity - java.lang.String
Gets the string used to represent infinity. Almost always left unchanged. returns: the string representing infinity - `java.lang.String`
(get-international-currency-symbol this)
Returns the ISO 4217 currency code of the currency of these DecimalFormatSymbols.
returns: the currency code - java.lang.String
Returns the ISO 4217 currency code of the currency of these DecimalFormatSymbols. returns: the currency code - `java.lang.String`
(get-minus-sign this)
Gets the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format.
returns: the character representing minus sign - char
Gets the character used to represent minus sign. If no explicit negative format is specified, one is formed by prefixing minusSign to the positive format. returns: the character representing minus sign - `char`
(get-monetary-decimal-separator this)
Returns the monetary decimal separator.
returns: the monetary decimal separator - char
Returns the monetary decimal separator. returns: the monetary decimal separator - `char`
(get-na-n this)
Gets the string used to represent "not a number". Almost always left unchanged.
returns: the string representing "not a number" - java.lang.String
Gets the string used to represent "not a number". Almost always left unchanged. returns: the string representing "not a number" - `java.lang.String`
(get-pattern-separator this)
Gets the character used to separate positive and negative subpatterns in a pattern.
returns: the pattern separator - char
Gets the character used to separate positive and negative subpatterns in a pattern. returns: the pattern separator - `char`
(get-per-mill this)
Gets the character used for per mille sign. Different for Arabic, etc.
returns: the character used for per mille sign - char
Gets the character used for per mille sign. Different for Arabic, etc. returns: the character used for per mille sign - `char`
(get-percent this)
Gets the character used for percent sign. Different for Arabic, etc.
returns: the character used for percent sign - char
Gets the character used for percent sign. Different for Arabic, etc. returns: the character used for percent sign - `char`
(get-zero-digit this)
Gets the character used for zero. Different for Arabic, etc.
returns: the character used for zero - char
Gets the character used for zero. Different for Arabic, etc. returns: the character used for zero - `char`
(hash-code this)
Override hashCode.
returns: a hash code value for this object. - int
Override hashCode. returns: a hash code value for this object. - `int`
(set-currency this currency)
Sets the currency of these DecimalFormatSymbols. 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.
currency - the new currency to be used - java.util.Currency
throws: java.lang.NullPointerException - if currency is null
Sets the currency of these DecimalFormatSymbols. 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. currency - the new currency to be used - `java.util.Currency` throws: java.lang.NullPointerException - if currency is null
(set-currency-symbol this currency)
Sets the currency symbol for the currency of these DecimalFormatSymbols in their locale.
currency - the currency symbol - java.lang.String
Sets the currency symbol for the currency of these DecimalFormatSymbols in their locale. currency - the currency symbol - `java.lang.String`
(set-decimal-separator this decimal-separator)
Sets the character used for decimal sign. Different for French, etc.
decimal-separator - the character used for decimal sign - char
Sets the character used for decimal sign. Different for French, etc. decimal-separator - the character used for decimal sign - `char`
(set-digit this digit)
Sets the character used for a digit in a pattern.
digit - the character used for a digit in a pattern - char
Sets the character used for a digit in a pattern. digit - the character used for a digit in a pattern - `char`
(set-exponent-separator this exp)
Sets the string used to separate the mantissa from the exponent. Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
exp - the exponent separator string - java.lang.String
throws: java.lang.NullPointerException - if exp is null
Sets the string used to separate the mantissa from the exponent. Examples: "x10^" for 1.23x10^4, "E" for 1.23E4. exp - the exponent separator string - `java.lang.String` throws: java.lang.NullPointerException - if exp is null
(set-grouping-separator this grouping-separator)
Sets the character used for thousands separator. Different for French, etc.
grouping-separator - the grouping separator - char
Sets the character used for thousands separator. Different for French, etc. grouping-separator - the grouping separator - `char`
(set-infinity this infinity)
Sets the string used to represent infinity. Almost always left unchanged.
infinity - the string representing infinity - java.lang.String
Sets the string used to represent infinity. Almost always left unchanged. infinity - the string representing infinity - `java.lang.String`
(set-international-currency-symbol this currency-code)
Sets the ISO 4217 currency code of the currency of these DecimalFormatSymbols. If the currency code is valid (as defined by Currency.getInstance), this also sets the currency attribute to the corresponding Currency instance and the currency symbol attribute to the currency's symbol in the DecimalFormatSymbols' locale. If the currency code is not valid, then the currency attribute is set to null and the currency symbol attribute is not modified.
currency-code - the currency code - java.lang.String
Sets the ISO 4217 currency code of the currency of these DecimalFormatSymbols. If the currency code is valid (as defined by Currency.getInstance), this also sets the currency attribute to the corresponding Currency instance and the currency symbol attribute to the currency's symbol in the DecimalFormatSymbols' locale. If the currency code is not valid, then the currency attribute is set to null and the currency symbol attribute is not modified. currency-code - the currency code - `java.lang.String`
(set-minus-sign this minus-sign)
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.
minus-sign - the character representing minus sign - char
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. minus-sign - the character representing minus sign - `char`
(set-monetary-decimal-separator this sep)
Sets the monetary decimal separator.
sep - the monetary decimal separator - char
Sets the monetary decimal separator. sep - the monetary decimal separator - `char`
(set-na-n this na-n)
Sets the string used to represent "not a number". Almost always left unchanged.
na-n - the string representing "not a number" - java.lang.String
Sets the string used to represent "not a number". Almost always left unchanged. na-n - the string representing "not a number" - `java.lang.String`
(set-pattern-separator this pattern-separator)
Sets the character used to separate positive and negative subpatterns in a pattern.
pattern-separator - the pattern separator - char
Sets the character used to separate positive and negative subpatterns in a pattern. pattern-separator - the pattern separator - `char`
(set-per-mill this per-mill)
Sets the character used for per mille sign. Different for Arabic, etc.
per-mill - the character used for per mille sign - char
Sets the character used for per mille sign. Different for Arabic, etc. per-mill - the character used for per mille sign - `char`
(set-percent this percent)
Sets the character used for percent sign. Different for Arabic, etc.
percent - the character used for percent sign - char
Sets the character used for percent sign. Different for Arabic, etc. percent - the character used for percent sign - `char`
(set-zero-digit this zero-digit)
Sets the character used for zero. Different for Arabic, etc.
zero-digit - the character used for zero - char
Sets the character used for zero. Different for Arabic, etc. zero-digit - the character used for zero - `char`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close