<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.text.DecimalFormat
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.text.html">This Package</a>  <a href="java.text.DateFormatSymbols.html#_top_">Previous</a>  <a href="java.text.DecimalFormatSymbols.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.text.DecimalFormat
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.text.Format.html#_top_">java.text.Format</a>
           |
           +----<a href="java.text.NumberFormat.html#_top_">java.text.NumberFormat</a>
                   |
                   +----java.text.DecimalFormat
</pre>
<hr>
<dl>
  <dt> public class <b>DecimalFormat</b>
  <dt> extends <a href="java.text.NumberFormat.html#_top_">NumberFormat</a>
</dl>
<code>DecimalFormat</code> is a concrete subclass of <code>NumberFormat</code>
 for formatting decimal numbers. This class allows for a variety
 of parameters, and localization to Western, Arabic, or Indic numbers.
 <p>
 Normally, you get the proper <code>NumberFormat</code> for a specific
 locale (including the default locale) using one of <code>NumberFormat</code>'s
 factory methods such as <code>getInstance</code>. You may then modify it
 from there (after testing to make sure it is a <code>DecimalFormat</code>,
 of course!)
 <p>
 Either the prefixes or the suffixes must be different for
 the parse to distinguish positive from negative.
 Parsing will be unreliable if the digits, thousands or decimal separators
 are the same, or if any of them occur in the prefixes or suffixes.
 <p>
 <strong>Special cases:</strong>
 <p>
 <code>NaN</code> is formatted as a single character, typically
 <code>\\uFFFD</code>.
 <p>
 +/-Infinity is formatted as a single character, typically <code>\\u221E</code>,
 plus the positive and negative pre/suffixes.
 <p><code>Note:</code> this class is designed for common users; for very
 large or small numbers, use a format that can express exponential values.
 <p><strong>Example:</strong>
 <blockquote>
 <pre>
 // normally we would have a GUI with a menu for this
 Locale[] locales = NumberFormat.getAvailableLocales();
 double myNumber = -1234.56;
 NumberFormat form;
 // just for fun, we print out a number with the locale number, currency
 // and percent format for each locale we can.
 for (int j = 0; j < 3; ++j) {
     System.out.println("FORMAT");
     for (int i = 0; i < locales.length; ++i) {
         if (locales[i].getCountry().length() == 0) {
            // skip language-only
            continue;
         }
         System.out.print(locales[i].getDisplayName());
         switch (j) {
         default:
             form = NumberFormat.getInstance(locales[i]); break;
         case 1:
             form = NumberFormat.getCurrencyInstance(locales[i]); break;
         case 0:
             form = NumberFormat.getPercentInstance(locales[i]); break;
         }
         try {
             System.out.print(": " + ((DecimalFormat)form).toPattern()
                          + " -> " + form.format(myNumber));
         } catch (IllegalArgumentException iae) { }
         try {
             System.out.println(" -> " + form.parse(form.format(myNumber)));
         } catch (ParseException pe) { }
     }
 }
 </pre>
 </blockquote>
 <strong>The following shows the structure of the pattern.</strong>
 <pre>
 pattern    := subpattern{;subpattern}
 subpattern := {prefix}integer{.fraction}{suffix}
 prefix     := '\\u0000'..'\\uFFFD' - specialCharacters
 suffix     := '\\u0000'..'\\uFFFD' - specialCharacters
 integer    := '#'* '0'* '0'
 fraction   := '0'* '#'*
 Notation:
  X*       0 or more instances of X
  (X | Y)  either X or Y.
  X..Y     any character from X up to Y, inclusive.
  S - T    characters in S, except those in T
 </pre>
 The first subpattern is for positive numbers. The second (optional)
 subpattern is for negative numbers. (In both cases, ',' can occur
 inside the integer portion--it is just too messy to indicate in BNF.)
 <p>
 Here are the special characters used in the parts of the
 subpattern, with notes on their usage.
 <pre>
 Symbol Meaning
 0      a digit
 #      a digit, zero shows as absent
 .      placeholder for decimal separator
 ,      placeholder for grouping separator.
 ;      separates formats.
 -      default negative prefix.
 %      multiply by 100 and show as percentage
 ? multiply by 1000 and show as per mille
  currency sign; replaced by currency symbol; if
        doubled, replaced by international currency symbol.
        If present in a pattern, the monetary decimal separator
        is used instead of the decimal separator.
 X      any other characters can be used in the prefix or suffix
 '      used to quote special characters in a prefix or suffix.
 </pre>
 <p><strong>Notes</strong>
 <p>
 If there is no explicit negative subpattern, - is prefixed to the
 positive form. That is, "0.00" alone is equivalent to "0.00;-0.00".
 <p>
 Illegal patterns, such as "#.#.#" or mixing '_' and '*' in the
 same pattern, will cause an <code>IllegalArgumentException</code> to be
 thrown. From the message of <code>IllegalArgumentException</code>, you can
 find the place in the string where the error occurred.
 <p>
 The grouping separator is commonly used for thousands, but in some
 countries for ten-thousands. The interval is a constant number of
 digits between the grouping characters, such as 100,000,000 or 1,0000,0000.
 If you supply a pattern with multiple grouping characters, the interval
 between the last one and the end of the integer is the one that is
 used. So "#,##,###,####" == "######,####" == "##,####,####".
 <p>
 When calling DecimalFormat.parse(String, ParsePosition) and parsing
 fails, a null object will be returned.  The unchanged parse position
 also reflects that an error has occurred during parsing.  When calling
 the convenient method DecimalFormat.parse(String) and parsing fails,
 a ParseException will be thrown.
 <p>
 This class only handles localized digits where the 10 digits
 are contiguous in Unicode, from 0 to 9. Other digits sets
 (such as superscripts) would need a different subclass.
<p>
<dl>
    <dt> <b>See Also:</b>
    <dd> Format, NumberFormat, ChoiceFormat
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DecimalFormat()"><b>DecimalFormat</b></a>()
  <dd>  Create a DecimalFormat using the default pattern and symbols
 for the default locale.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DecimalFormat(java.lang.String)"><b>DecimalFormat</b></a>(String)
  <dd>  Create a DecimalFormat from the given pattern and the symbols
 for the default locale.
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#DecimalFormat(java.lang.String, java.text.DecimalFormatSymbols)"><b>DecimalFormat</b></a>(String, DecimalFormatSymbols)
  <dd>  Create a DecimalFormat from the given pattern and symbols.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#applyLocalizedPattern(java.lang.String)"><b>applyLocalizedPattern</b></a>(String)
  <dd>  Apply the given pattern to this Format object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#applyPattern(java.lang.String)"><b>applyPattern</b></a>(String)
  <dd>  Apply the given pattern to this Format object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#clone()"><b>clone</b></a>()
  <dd>  Standard override; no change in semantics.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.lang.Object)"><b>equals</b></a>(Object)
  <dd>  Overrides equals

  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#format(double, java.lang.StringBuffer, java.text.FieldPosition)"><b>format</b></a>(double, StringBuffer, FieldPosition)
  <dd>  Specialization of format.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#format(long, java.lang.StringBuffer, java.text.FieldPosition)"><b>format</b></a>(long, StringBuffer, FieldPosition)
  <dd>  Specialization of format.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getDecimalFormatSymbols()"><b>getDecimalFormatSymbols</b></a>()
  <dd>  Returns the decimal format symbols, which is generally not changed
 by the programmer or user.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getGroupingSize()"><b>getGroupingSize</b></a>()
  <dd>  Return the grouping size.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getMultiplier()"><b>getMultiplier</b></a>()
  <dd>  Get the multiplier for use in percent, permill, etc.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getNegativePrefix()"><b>getNegativePrefix</b></a>()
  <dd>  Get the negative prefix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getNegativeSuffix()"><b>getNegativeSuffix</b></a>()
  <dd>  Get the negative suffix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getPositivePrefix()"><b>getPositivePrefix</b></a>()
  <dd>  Get the positive prefix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getPositiveSuffix()"><b>getPositiveSuffix</b></a>()
  <dd>  Get the positive suffix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#hashCode()"><b>hashCode</b></a>()
  <dd>  Overrides hashCode

  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#isDecimalSeparatorAlwaysShown()"><b>isDecimalSeparatorAlwaysShown</b></a>()
  <dd>  Allows you to get the behavior of the decimal separator with integers.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#parse(java.lang.String, java.text.ParsePosition)"><b>parse</b></a>(String, ParsePosition)
  <dd>  Returns a Long if possible (e.g.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setDecimalFormatSymbols(java.text.DecimalFormatSymbols)"><b>setDecimalFormatSymbols</b></a>(DecimalFormatSymbols)
  <dd>  Sets the decimal format symbols, which is generally not changed
 by the programmer or user.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setDecimalSeparatorAlwaysShown(boolean)"><b>setDecimalSeparatorAlwaysShown</b></a>(boolean)
  <dd>  Allows you to set the behavior of the decimal separator with integers.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setGroupingSize(int)"><b>setGroupingSize</b></a>(int)
  <dd>  Set the grouping size.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setMultiplier(int)"><b>setMultiplier</b></a>(int)
  <dd>  Set the multiplier for use in percent, permill, etc.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setNegativePrefix(java.lang.String)"><b>setNegativePrefix</b></a>(String)
  <dd>  Set the negative prefix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setNegativeSuffix(java.lang.String)"><b>setNegativeSuffix</b></a>(String)
  <dd>  Set the positive suffix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setPositivePrefix(java.lang.String)"><b>setPositivePrefix</b></a>(String)
  <dd>  Set the positive prefix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setPositiveSuffix(java.lang.String)"><b>setPositiveSuffix</b></a>(String)
  <dd>  Set the positive suffix.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toLocalizedPattern()"><b>toLocalizedPattern</b></a>()
  <dd>  Synthesizes a localized pattern string that represents the current
 state of this Format object.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toPattern()"><b>toPattern</b></a>()
  <dd>  Synthesizes a pattern string that represents the current state
 of this Format object.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="DecimalFormat"></a>
<a name="DecimalFormat()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DecimalFormat</b>
<pre>
 public DecimalFormat()
</pre>
<dl>
  <dd> Create a DecimalFormat using the default pattern and symbols
 for the default locale. This is a convenient way to obtain a
 DecimalFormat when internationalization is not the main concern.
 <p>
 To obtain standard formats for a given locale, use the factory methods
 on NumberFormat such as getNumberInstance. These factories will
 return the most appropriate sub-class of NumberFormat for a given
 locale.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="java.text.NumberFormat.html#getInstance">getInstance</a>, <a href="java.text.NumberFormat.html#getNumberInstance">getNumberInstance</a>, <a href="java.text.NumberFormat.html#getCurrencyInstance">getCurrencyInstance</a>, <a href="java.text.NumberFormat.html#getPercentInstance">getPercentInstance</a>
  </dl></dd>
</dl>
<a name="DecimalFormat(java.lang.String)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DecimalFormat</b>
<pre>
 public DecimalFormat(<a href="java.lang.String.html#_top_">String</a> pattern)
</pre>
<dl>
  <dd> Create a DecimalFormat from the given pattern and the symbols
 for the default locale. This is a convenient way to obtain a
 DecimalFormat when internationalization is not the main concern.
 <p>
 To obtain standard formats for a given locale, use the factory methods
 on NumberFormat such as getNumberInstance. These factories will
 return the most appropriate sub-class of NumberFormat for a given
 locale.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> pattern - A non-localized pattern string.
    <dt> <b>Throws:</b> <a href="java.lang.IllegalArgumentException.html#_top_">IllegalArgumentException</a>
    <dd> if the given pattern is invalid.
    <dt> <b>See Also:</b>
    <dd> <a href="java.text.NumberFormat.html#getInstance">getInstance</a>, <a href="java.text.NumberFormat.html#getNumberInstance">getNumberInstance</a>, <a href="java.text.NumberFormat.html#getCurrencyInstance">getCurrencyInstance</a>, <a href="java.text.NumberFormat.html#getPercentInstance">getPercentInstance</a>
  </dl></dd>
</dl>
<a name="DecimalFormat(java.lang.String, java.text.DecimalFormatSymbols)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>DecimalFormat</b>
<pre>
 public DecimalFormat(<a href="java.lang.String.html#_top_">String</a> pattern,
                      <a href="java.text.DecimalFormatSymbols.html#_top_">DecimalFormatSymbols</a> symbols)
</pre>
<dl>
  <dd> Create a DecimalFormat from the given pattern and symbols.
 Use this constructor when you need to completely customize the
 behavior of the format.
 <p>
 To obtain standard formats for a given
 locale, use the factory methods on NumberFormat such as
 getInstance or getCurrencyInstance. If you need only minor adjustments
 to a standard format, you can modify the format returned by
 a NumberFormat factory method.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> pattern - a non-localized pattern string
    <dd> symbols - the set of symbols to be used
    <dt> <b>Throws:</b> <a href="java.lang.IllegalArgumentException.html#_top_">IllegalArgumentException</a>
    <dd> if the given pattern is invalid
    <dt> <b>See Also:</b>
    <dd> <a href="java.text.NumberFormat.html#getInstance">getInstance</a>, <a href="java.text.NumberFormat.html#getNumberInstance">getNumberInstance</a>, <a href="java.text.NumberFormat.html#getCurrencyInstance">getCurrencyInstance</a>, <a href="java.text.NumberFormat.html#getPercentInstance">getPercentInstance</a>, <a href="java.text.DecimalFormatSymbols.html#_top_">DecimalFormatSymbols</a>
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="format(double, java.lang.StringBuffer, java.text.FieldPosition)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="format"><b>format</b></a>
<pre>
 public <a href="java.lang.StringBuffer.html#_top_">StringBuffer</a> format(double number,
                            <a href="java.lang.StringBuffer.html#_top_">StringBuffer</a> result,
                            <a href="java.text.FieldPosition.html#_top_">FieldPosition</a> fieldPosition)
</pre>
<dl>
  <dd> Specialization of format.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.text.NumberFormat.html#format(double, java.lang.StringBuffer, java.text.FieldPosition)">format</a> in class <a href="java.text.NumberFormat.html#_top_">NumberFormat</a>
  </dl></dd>
</dl>
<a name="format(long, java.lang.StringBuffer, java.text.FieldPosition)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="format"><b>format</b></a>
<pre>
 public <a href="java.lang.StringBuffer.html#_top_">StringBuffer</a> format(long number,
                            <a href="java.lang.StringBuffer.html#_top_">StringBuffer</a> result,
                            <a href="java.text.FieldPosition.html#_top_">FieldPosition</a> fieldPosition)
</pre>
<dl>
  <dd> Specialization of format.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.text.NumberFormat.html#format(long, java.lang.StringBuffer, java.text.FieldPosition)">format</a> in class <a href="java.text.NumberFormat.html#_top_">NumberFormat</a>
  </dl></dd>
</dl>
<a name="parse(java.lang.String, java.text.ParsePosition)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="parse"><b>parse</b></a>
<pre>
 public <a href="java.lang.Number.html#_top_">Number</a> parse(<a href="java.lang.String.html#_top_">String</a> text,
                     <a href="java.text.ParsePosition.html#_top_">ParsePosition</a> parsePosition)
</pre>
<dl>
  <dd> Returns a Long if possible (e.g.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.text.NumberFormat.html#parse(java.lang.String, java.text.ParsePosition)">parse</a> in class <a href="java.text.NumberFormat.html#_top_">NumberFormat</a>
  </dl></dd>
</dl>
<a name="getDecimalFormatSymbols()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getDecimalFormatSymbols"><b>getDecimalFormatSymbols</b></a>
<pre>
 public <a href="java.text.DecimalFormatSymbols.html#_top_">DecimalFormatSymbols</a> getDecimalFormatSymbols()
</pre>
<dl>
  <dd> Returns the decimal format symbols, which is generally not changed
 by the programmer or user.
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> desired DecimalFormatSymbols
    <dt> <b>See Also:</b>
    <dd> DecimalFormatSymbols
  </dl></dd>
</dl>
<a name="setDecimalFormatSymbols(java.text.DecimalFormatSymbols)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setDecimalFormatSymbols"><b>setDecimalFormatSymbols</b></a>
<pre>
 public void setDecimalFormatSymbols(<a href="java.text.DecimalFormatSymbols.html#_top_">DecimalFormatSymbols</a> newSymbols)
</pre>
<dl>
  <dd> Sets the decimal format symbols, which is generally not changed
 by the programmer or user.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> newSymbols - desired DecimalFormatSymbols
    <dt> <b>See Also:</b>
    <dd> DecimalFormatSymbols
  </dl></dd>
</dl>
<a name="getPositivePrefix()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getPositivePrefix"><b>getPositivePrefix</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getPositivePrefix()
</pre>
<dl>
  <dd> Get the positive prefix.
 <P>Examples: +123, $123, sFr123
<p>
</dl>
<a name="setPositivePrefix(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setPositivePrefix"><b>setPositivePrefix</b></a>
<pre>
 public void setPositivePrefix(<a href="java.lang.String.html#_top_">String</a> newValue)
</pre>
<dl>
  <dd> Set the positive prefix.
 <P>Examples: +123, $123, sFr123
<p>
</dl>
<a name="getNegativePrefix()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getNegativePrefix"><b>getNegativePrefix</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getNegativePrefix()
</pre>
<dl>
  <dd> Get the negative prefix.
 <P>Examples: -123, ($123) (with negative suffix), sFr-123
<p>
</dl>
<a name="setNegativePrefix(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setNegativePrefix"><b>setNegativePrefix</b></a>
<pre>
 public void setNegativePrefix(<a href="java.lang.String.html#_top_">String</a> newValue)
</pre>
<dl>
  <dd> Set the negative prefix.
 <P>Examples: -123, ($123) (with negative suffix), sFr-123
<p>
</dl>
<a name="getPositiveSuffix()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getPositiveSuffix"><b>getPositiveSuffix</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getPositiveSuffix()
</pre>
<dl>
  <dd> Get the positive suffix.
 <P>Example: 123%
<p>
</dl>
<a name="setPositiveSuffix(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setPositiveSuffix"><b>setPositiveSuffix</b></a>
<pre>
 public void setPositiveSuffix(<a href="java.lang.String.html#_top_">String</a> newValue)
</pre>
<dl>
  <dd> Set the positive suffix.
 <P>Example: 123%
<p>
</dl>
<a name="getNegativeSuffix()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getNegativeSuffix"><b>getNegativeSuffix</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> getNegativeSuffix()
</pre>
<dl>
  <dd> Get the negative suffix.
 <P>Examples: -123%, ($123) (with positive suffixes)
<p>
</dl>
<a name="setNegativeSuffix(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setNegativeSuffix"><b>setNegativeSuffix</b></a>
<pre>
 public void setNegativeSuffix(<a href="java.lang.String.html#_top_">String</a> newValue)
</pre>
<dl>
  <dd> Set the positive suffix.
 <P>Examples: 123%
<p>
</dl>
<a name="getMultiplier()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getMultiplier"><b>getMultiplier</b></a>
<pre>
 public int getMultiplier()
</pre>
<dl>
  <dd> Get the multiplier for use in percent, permill, etc.
 For a percentage, set the suffixes to have "%" and the multiplier to be 100.
 (For Arabic, use arabic percent symbol).
 For a permill, set the suffixes to have "?" and the multiplier to be 1000.
 <P>Examples: with 100, 1.23 -> "123", and "123" -> 1.23
<p>
</dl>
<a name="setMultiplier(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setMultiplier"><b>setMultiplier</b></a>
<pre>
 public void setMultiplier(int newValue)
</pre>
<dl>
  <dd> Set the multiplier for use in percent, permill, etc.
 For a percentage, set the suffixes to have "%" and the multiplier to be 100.
 (For Arabic, use arabic percent symbol).
 For a permill, set the suffixes to have "?" and the multiplier to be 1000.
 <P>Examples: with 100, 1.23 -> "123", and "123" -> 1.23
<p>
</dl>
<a name="getGroupingSize()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getGroupingSize"><b>getGroupingSize</b></a>
<pre>
 public int getGroupingSize()
</pre>
<dl>
  <dd> Return the grouping size. Grouping size is the number of digits between
 grouping separators in the integer portion of a number.  For example,
 in the number "123,456.78", the grouping size is 3.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="#setGroupingSize">setGroupingSize</a>, <a href="java.text.NumberFormat.html#isGroupingUsed">isGroupingUsed</a>, <a href="java.text.DecimalFormatSymbols.html#getGroupingSeparator">getGroupingSeparator</a>
  </dl></dd>
</dl>
<a name="setGroupingSize(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setGroupingSize"><b>setGroupingSize</b></a>
<pre>
 public void setGroupingSize(int newValue)
</pre>
<dl>
  <dd> Set the grouping size. Grouping size is the number of digits between
 grouping separators in the integer portion of a number.  For example,
 in the number "123,456.78", the grouping size is 3.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="#getGroupingSize">getGroupingSize</a>, <a href="java.text.NumberFormat.html#setGroupingUsed">setGroupingUsed</a>, <a href="java.text.DecimalFormatSymbols.html#setGroupingSeparator">setGroupingSeparator</a>
  </dl></dd>
</dl>
<a name="isDecimalSeparatorAlwaysShown()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="isDecimalSeparatorAlwaysShown"><b>isDecimalSeparatorAlwaysShown</b></a>
<pre>
 public boolean isDecimalSeparatorAlwaysShown()
</pre>
<dl>
  <dd> Allows you to get the behavior of the decimal separator with integers.
 (The decimal separator will always appear with decimals.)
 <P>Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345
<p>
</dl>
<a name="setDecimalSeparatorAlwaysShown(boolean)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setDecimalSeparatorAlwaysShown"><b>setDecimalSeparatorAlwaysShown</b></a>
<pre>
 public void setDecimalSeparatorAlwaysShown(boolean newValue)
</pre>
<dl>
  <dd> Allows you to set the behavior of the decimal separator with integers.
 (The decimal separator will always appear with decimals.)
 <P>Example: Decimal ON: 12345 -> 12345.; OFF: 12345 -> 12345
<p>
</dl>
<a name="clone()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="clone"><b>clone</b></a>
<pre>
 public <a href="java.lang.Object.html#_top_">Object</a> clone()
</pre>
<dl>
  <dd> Standard override; no change in semantics.
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.text.NumberFormat.html#clone()">clone</a> in class <a href="java.text.NumberFormat.html#_top_">NumberFormat</a>
  </dl></dd>
</dl>
<a name="equals(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="java.lang.Object.html#_top_">Object</a> obj)
</pre>
<dl>
  <dd> Overrides equals
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.text.NumberFormat.html#equals(java.lang.Object)">equals</a> in class <a href="java.text.NumberFormat.html#_top_">NumberFormat</a>
  </dl></dd>
</dl>
<a name="hashCode()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="hashCode"><b>hashCode</b></a>
<pre>
 public int hashCode()
</pre>
<dl>
  <dd> Overrides hashCode
<p>
  <dd><dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.text.NumberFormat.html#hashCode()">hashCode</a> in class <a href="java.text.NumberFormat.html#_top_">NumberFormat</a>
  </dl></dd>
</dl>
<a name="toPattern()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toPattern"><b>toPattern</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toPattern()
</pre>
<dl>
  <dd> Synthesizes a pattern string that represents the current state
 of this Format object.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="#applyPattern">applyPattern</a>
  </dl></dd>
</dl>
<a name="toLocalizedPattern()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toLocalizedPattern"><b>toLocalizedPattern</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toLocalizedPattern()
</pre>
<dl>
  <dd> Synthesizes a localized pattern string that represents the current
 state of this Format object.
<p>
  <dd><dl>
    <dt> <b>See Also:</b>
    <dd> <a href="#applyPattern">applyPattern</a>
  </dl></dd>
</dl>
<a name="applyPattern(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="applyPattern"><b>applyPattern</b></a>
<pre>
 public void applyPattern(<a href="java.lang.String.html#_top_">String</a> pattern)
</pre>
<dl>
  <dd> Apply the given pattern to this Format object.  A pattern is a
 short-hand specification for the various formatting properties.
 These properties can also be changed individually through the
 various setter methods.
 <p>
 There is no limit to integer digits are set
 by this routine, since that is the typical end-user desire;
 use setMaximumInteger if you want to set a real value.
 For negative numbers, use a second pattern, separated by a semicolon
 <P>Example "#,#00.0#" -> 1,234.56
 <P>This means a minimum of 2 integer digits, 1 fraction digit, and
 a maximum of 2 fraction digits.
 <p>Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.
 <p>In negative patterns, the minimum and maximum counts are ignored;
 these are presumed to be set in the positive pattern.
<p>
</dl>
<a name="applyLocalizedPattern(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="applyLocalizedPattern"><b>applyLocalizedPattern</b></a>
<pre>
 public void applyLocalizedPattern(<a href="java.lang.String.html#_top_">String</a> pattern)
</pre>
<dl>
  <dd> Apply the given pattern to this Format object.  The pattern
 is assumed to be in a localized notation. A pattern is a
 short-hand specification for the various formatting properties.
 These properties can also be changed individually through the
 various setter methods.
 <p>
 There is no limit to integer digits are set
 by this routine, since that is the typical end-user desire;
 use setMaximumInteger if you want to set a real value.
 For negative numbers, use a second pattern, separated by a semicolon
 <P>Example "#,#00.0#" -> 1,234.56
 <P>This means a minimum of 2 integer digits, 1 fraction digit, and
 a maximum of 2 fraction digits.
 <p>Example: "#,#00.0#;(#,#00.0#)" for negatives in parantheses.
 <p>In negative patterns, the minimum and maximum counts are ignored;
 these are presumed to be set in the positive pattern.
<p>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.text.html">This Package</a>  <a href="java.text.DateFormatSymbols.html#_top_">Previous</a>  <a href="java.text.DecimalFormatSymbols.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
