Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.text

Class DecimalFormatSymbols

java.lang.Object
|
+--java.text.DecimalFormatSymbols

All Implemented Interfaces:

Cloneable, Serializable


public final class DecimalFormatSymbols

extends Object

implements Cloneable, Serializable

This class is a container for the symbols used by DecimalFormat to format numbers and currency. These are normally handled automatically, but an application can override values as desired using this class.

Authors:

Constructor Summary

DecimalFormatSymbols()

This method initializes a new instance of DecimalFormatSymbols for the default locale.
DecimalFormatSymbols(java.util.Locale loc)

This method initializes a new instance of DecimalFormatSymbols for the specified locale.

Method Summary

java.lang.Objectclone()

This class is a container for the symbols used by DecimalFormat to format numbers and currency.
booleanequals(java.lang.Object obj)

This method this this object for equality against the specified object.
java.lang.StringgetCurrencySymbol()

This method returns the currency symbol in local format.
chargetDecimalSeparator()

This method returns the character used as the decimal point.
chargetDigit()

This method returns the character used to represent a digit in a format pattern string.
chargetGroupingSeparator()

This method sets the character used to separate groups of digits.
java.lang.StringgetInfinity()

This method returns the character used to represent infinity.
java.lang.StringgetInternationalCurrencySymbol()

This method returns the currency symbol in international format.
chargetMinusSign()

This method returns the character used to represent the minus sign.
chargetMonetaryDecimalSeparator()

This method returns the character used to represent the decimal point for currency values.
java.lang.StringgetNaN()

This method returns the string used to represent the NaN (not a number) value.
chargetPatternSeparator()

This method returns the character used to separate positive and negative subpatterns in a format pattern.
chargetPerMill()

This method returns the character used as the per mille character.
chargetPercent()

This method returns the character used as the percent sign.
chargetZeroDigit()

This method returns the character used to represent the digit zero.
inthashCode()

This method returns a hash value for this object.
voidsetCurrencySymbol(java.lang.String currency)

This method sets the currency symbol to the specified value.
voidsetDecimalSeparator(char decimalSep)

This method sets the decimal point character to the specified value.
voidsetDigit(char digit)

This method sets the character used to represents a digit in a format string to the specified value.
voidsetGroupingSeparator(char groupSep)

This method sets the character used to separate groups of digits.
voidsetInfinity(java.lang.String infinity)

This method sets the string used to represents infinity.
voidsetInternationalCurrencySymbol(java.lang.String currency)

This method sets the international currency symbols to the specified value.
voidsetMinusSign(char minusSign)

This method sets the character used to represent the minus sign.
voidsetMonetaryDecimalSeparator(char decimalSep)

This method sets the character used for the decimal point in currency values.
voidsetNaN(java.lang.String nan)

This method sets the string used to represent the NaN (not a number) value.
voidsetPatternSeparator(char patternSep)

This method sets the character used to separate positive and negative subpatterns in a format pattern.
voidsetPerMill(char perMill)

This method sets the character used as the per mille character.
voidsetPercent(char percent)

This method sets the character used as the percent sign.
voidsetZeroDigit(char zeroDigit)

This method sets the character used to represent the digit zero.

Constructor Details

DecimalFormatSymbols

public DecimalFormatSymbols()

This method initializes a new instance of DecimalFormatSymbols for the default locale.


DecimalFormatSymbols

public DecimalFormatSymbols(java.util.Locale loc)

This method initializes a new instance of DecimalFormatSymbols for the specified locale.

Parameters:


Method Details

clone

public Object clone()

This class is a container for the symbols used by DecimalFormat to format numbers and currency. These are normally handled automatically, but an application can override values as desired using this class.

Authors:

equals

public boolean equals(java.lang.Object obj)

This method this this object for equality against the specified object. This will be true if and only if the following criteria are met with regard to the specified object:

Parameters:

Returns:


getCurrencySymbol

public String getCurrencySymbol()

This method returns the currency symbol in local format. For example, "$" for Canadian dollars.

Returns:


getDecimalSeparator

public char getDecimalSeparator()

This method returns the character used as the decimal point.

Returns:


getDigit

public char getDigit()

This method returns the character used to represent a digit in a format pattern string.

Returns:


getGroupingSeparator

public char getGroupingSeparator()

This method sets the character used to separate groups of digits. For example, the United States uses a comma (,) to separate thousands in a number.

Returns:


getInfinity

public String getInfinity()

This method returns the character used to represent infinity.

Returns:


getInternationalCurrencySymbol

public String getInternationalCurrencySymbol()

This method returns the currency symbol in international format. For example, "C$" for Canadian dollars.

Returns:


getMinusSign

public char getMinusSign()

This method returns the character used to represent the minus sign.

Returns:


getMonetaryDecimalSeparator

public char getMonetaryDecimalSeparator()

This method returns the character used to represent the decimal point for currency values.

Returns:


getNaN

public String getNaN()

This method returns the string used to represent the NaN (not a number) value.

Returns:


getPatternSeparator

public char getPatternSeparator()

This method returns the character used to separate positive and negative subpatterns in a format pattern.

Returns:


getPerMill

public char getPerMill()

This method returns the character used as the per mille character.

Returns:


getPercent

public char getPercent()

This method returns the character used as the percent sign.

Returns:


getZeroDigit

public char getZeroDigit()

This method returns the character used to represent the digit zero.

Returns:


hashCode

public int hashCode()

This method returns a hash value for this object.

Returns:


setCurrencySymbol

public void setCurrencySymbol(java.lang.String currency)

This method sets the currency symbol to the specified value.

Parameters:


setDecimalSeparator

public void setDecimalSeparator(char decimalSep)

This method sets the decimal point character to the specified value.

Parameters:


setDigit

public void setDigit(char digit)

This method sets the character used to represents a digit in a format string to the specified value.

Parameters:


setGroupingSeparator

public void setGroupingSeparator(char groupSep)

This method sets the character used to separate groups of digits.

Parameters:


setInfinity

public void setInfinity(java.lang.String infinity)

This method sets the string used to represents infinity.

Parameters:


setInternationalCurrencySymbol

public void setInternationalCurrencySymbol(java.lang.String currency)

This method sets the international currency symbols to the specified value.

Parameters:


setMinusSign

public void setMinusSign(char minusSign)

This method sets the character used to represent the minus sign.

Parameters:


setMonetaryDecimalSeparator

public void setMonetaryDecimalSeparator(char decimalSep)

This method sets the character used for the decimal point in currency values.

Parameters:


setNaN

public void setNaN(java.lang.String nan)

This method sets the string used to represent the NaN (not a number) value.

Parameters:


setPatternSeparator

public void setPatternSeparator(char patternSep)

This method sets the character used to separate positive and negative subpatterns in a format pattern.

Parameters:


setPerMill

public void setPerMill(char perMill)

This method sets the character used as the per mille character.

Parameters:


setPercent

public void setPercent(char percent)

This method sets the character used as the percent sign.

Parameters:


setZeroDigit

public void setZeroDigit(char zeroDigit)

This method sets the character used to represent the digit zero.

Parameters: