GeezerVison is showing docs.oracle.com — DecimalFormatSymbols (Java Platform SE 8 )
Java™ Platform Standard Ed. 8
compact1, compact2, compact3
java.text
Class DecimalFormatSymbols
-
- All Implemented Interfaces:
- Serializable, Cloneable
public class DecimalFormatSymbols
extends Object
implements Cloneable, Serializable
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.
- See Also:
Locale,
DecimalFormat,
Serialized Form
-
-
Method Detail
-
setZeroDigit
public void setZeroDigit(char zeroDigit)
Sets the character used for zero. Different for Arabic, etc.
- Parameters:
zeroDigit - the character used for zero
-
getGroupingSeparator
public char getGroupingSeparator()
Gets the character used for thousands separator. Different for French, etc.
- Returns:
- the grouping separator
-
setGroupingSeparator
public void setGroupingSeparator(char groupingSeparator)
Sets the character used for thousands separator. Different for French, etc.
- Parameters:
groupingSeparator - the grouping separator
-
getDecimalSeparator
public char getDecimalSeparator()
Gets the character used for decimal sign. Different for French, etc.
- Returns:
- the character used for decimal sign
-
setDecimalSeparator
public void setDecimalSeparator(char decimalSeparator)
Sets the character used for decimal sign. Different for French, etc.
- Parameters:
decimalSeparator - the character used for decimal sign
-
setPerMill
public void setPerMill(char perMill)
Sets the character used for per mille sign. Different for Arabic, etc.
- Parameters:
perMill - the character used for per mille sign
-
setPercent
public void setPercent(char percent)
Sets the character used for percent sign. Different for Arabic, etc.
- Parameters:
percent - the character used for percent sign
-
getMinusSign
public char getMinusSign()
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
-
setMinusSign
public void setMinusSign(char minusSign)
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 - the character representing minus sign
-
getExponentSeparator
public String getExponentSeparator()
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
- Since:
- 1.6
- See Also:
setExponentSeparator(java.lang.String)
-
setExponentSeparator
public void setExponentSeparator(String exp)
Sets the string used to separate the mantissa from the exponent.
Examples: "x10^" for 1.23x10^4, "E" for 1.23E4.
- Parameters:
exp - the exponent separator string
- Throws:
NullPointerException - if exp is null
- Since:
- 1.6
- See Also:
getExponentSeparator()
-
clone
public Object clone()
Standard override.
- Overrides:
clone in class Object
- Returns:
- a clone of this instance.
- See Also:
Cloneable
Java™ Platform Standard Ed. 8
Submit a bug or feature For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. Copyright © 1993, 2026, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
|