/[classpath]/classpath/java/text/NumberFormat.java
ViewVC logotype

Diff of /classpath/java/text/NumberFormat.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by mark, Sat Jul 2 20:32:41 2005 UTC revision 1.18 by trebligd, Sat Jul 23 20:25:15 2005 UTC
# Line 237  public abstract class NumberFormat exten Line 237  public abstract class NumberFormat exten
237     * a <code>StringBuffer</code>.     * a <code>StringBuffer</code>.
238     *     *
239     * @param number The <code>double</code> to format.     * @param number The <code>double</code> to format.
240     * @param sb The <code>StringBuffer</code> to append the formatted number to.     * @param sbuf The <code>StringBuffer</code> to append the formatted number
241       *             to.
242     * @param pos The desired <code>FieldPosition</code>.     * @param pos The desired <code>FieldPosition</code>.
243     *     *
244     * @return The <code>StringBuffer</code> with the appended number.     * @return The <code>StringBuffer</code> with the appended number.
# Line 250  public abstract class NumberFormat exten Line 251  public abstract class NumberFormat exten
251     * a <code>StringBuffer</code>.     * a <code>StringBuffer</code>.
252     *     *
253     * @param number The <code>long</code> to format.     * @param number The <code>long</code> to format.
254     * @param sb The <code>StringBuffer</code> to append the formatted number to.     * @param sbuf The <code>StringBuffer</code> to append the formatted number
255       *             to.
256     * @param pos The desired <code>FieldPosition</code>.     * @param pos The desired <code>FieldPosition</code>.
257     *     *
258     * @return The <code>StringBuffer</code> with the appended number.     * @return The <code>StringBuffer</code> with the appended number.
# Line 371  public abstract class NumberFormat exten Line 373  public abstract class NumberFormat exten
373     * will be a concrete subclass of <code>NumberFormat</code>, but the     * will be a concrete subclass of <code>NumberFormat</code>, but the
374     * actual class returned is dependent on the locale.     * actual class returned is dependent on the locale.
375     *     *
376     * @param locale The desired locale.     * @param loc The desired locale.
377     *     *
378     * @return An instance of the default <code>NumberFormat</code> class.     * @return An instance of the default <code>NumberFormat</code> class.
379     */     */
# Line 434  public abstract class NumberFormat exten Line 436  public abstract class NumberFormat exten
436     * will be a concrete subclass of <code>NumberFormat</code>, but the     * will be a concrete subclass of <code>NumberFormat</code>, but the
437     * actual class returned is dependent on the locale.     * actual class returned is dependent on the locale.
438     *     *
    * @param locale The desired locale.  
    *  
439     * @return An instance of the default <code>NumberFormat</code> class.     * @return An instance of the default <code>NumberFormat</code> class.
440     */     */
441    public static final NumberFormat getNumberInstance ()    public static final NumberFormat getNumberInstance ()
# Line 502  public abstract class NumberFormat exten Line 502  public abstract class NumberFormat exten
502     * This method returns an instance of <code>NumberFormat</code> suitable     * This method returns an instance of <code>NumberFormat</code> suitable
503     * for formatting and parsing percentage values in the specified locale.     * for formatting and parsing percentage values in the specified locale.
504     *     *
505     * @param locale The desired locale.     * @param loc The desired locale.
506     *     *
507     * @return An instance of <code>NumberFormat</code> for handling percentages.     * @return An instance of <code>NumberFormat</code> for handling percentages.
508     */     */
# Line 571  public abstract class NumberFormat exten Line 571  public abstract class NumberFormat exten
571     * <code>Double</code>.    If no number can be parsed, no exception is     * <code>Double</code>.    If no number can be parsed, no exception is
572     * thrown.  Instead, the parse position remains at its initial index.     * thrown.  Instead, the parse position remains at its initial index.
573     *     *
574     * @param str The string to parse.     * @param sourceStr The string to parse.
575     * @param pp The desired <code>ParsePosition</code>.     * @param pos The desired <code>ParsePosition</code>.
576     *     *
577     * @return The parsed <code>Number</code>     * @return The parsed <code>Number</code>
578     */     */
# Line 584  public abstract class NumberFormat exten Line 584  public abstract class NumberFormat exten
584     * <code>Double</code>.  If no number can be parsed, an exception will be     * <code>Double</code>.  If no number can be parsed, an exception will be
585     * thrown.     * thrown.
586     *     *
587     * @param str The string to parse.     * @param sourceStr The string to parse.
588     *     *
589     * @return The parsed <code>Number</code>     * @return The parsed <code>Number</code>
590     *     *
# Line 610  public abstract class NumberFormat exten Line 610  public abstract class NumberFormat exten
610     * <code>Double</code>.    If no number can be parsed, no exception is     * <code>Double</code>.    If no number can be parsed, no exception is
611     * thrown.  Instead, the parse position remains at its initial index.     * thrown.  Instead, the parse position remains at its initial index.
612     *     *
613     * @param str The string to parse.     * @param sourceStr The string to parse.
614     * @param pp The desired <code>ParsePosition</code>.     * @param pos The desired <code>ParsePosition</code>.
615    *    *
616    * @return The parsed <code>Object</code>    * @return The parsed <code>Object</code>
617    */    */
# Line 629  public abstract class NumberFormat exten Line 629  public abstract class NumberFormat exten
629     * might appear as "1,000,000".  (Both of these assume the US English     * might appear as "1,000,000".  (Both of these assume the US English
630     * locale).     * locale).
631     *     *
632     * @param groupingUsed <code>true</code> to enable grouping,     * @param newValue <code>true</code> to enable grouping,
633     *                     <code>false</code> to disable it.     *                     <code>false</code> to disable it.
634     */     */
635    public void setGroupingUsed (boolean newValue)    public void setGroupingUsed (boolean newValue)
# Line 643  public abstract class NumberFormat exten Line 643  public abstract class NumberFormat exten
643     * current minimum allowed digits, the minimum allowed digits value will     * current minimum allowed digits, the minimum allowed digits value will
644     * be lowered to be equal to the new maximum allowed digits value.     * be lowered to be equal to the new maximum allowed digits value.
645     *     *
646     * @param maximumFractionDigits The new maximum fraction digits value.     * @param digits The new maximum fraction digits value.
647     */     */
648    public void setMaximumFractionDigits (int newValue)    public void setMaximumFractionDigits (int digits)
649    {    {
650      maximumFractionDigits = newValue;      maximumFractionDigits = digits;
651      if (getMinimumFractionDigits () > maximumFractionDigits)      if (getMinimumFractionDigits () > maximumFractionDigits)
652        setMinimumFractionDigits (maximumFractionDigits);        setMinimumFractionDigits (maximumFractionDigits);
653    }    }
# Line 658  public abstract class NumberFormat exten Line 658  public abstract class NumberFormat exten
658     * current minimum allowed digits, the minimum allowed digits value will     * current minimum allowed digits, the minimum allowed digits value will
659     * be lowered to be equal to the new maximum allowed digits value.     * be lowered to be equal to the new maximum allowed digits value.
660     *     *
661     * @param maximumIntegerDigits The new maximum integer digits value.     * @param digits The new maximum integer digits value.
662     */     */
663    public void setMaximumIntegerDigits (int newValue)    public void setMaximumIntegerDigits (int digits)
664    {    {
665      maximumIntegerDigits = newValue;      maximumIntegerDigits = digits;
666      if (getMinimumIntegerDigits () > maximumIntegerDigits)      if (getMinimumIntegerDigits () > maximumIntegerDigits)
667        setMinimumIntegerDigits (maximumIntegerDigits);        setMinimumIntegerDigits (maximumIntegerDigits);
668    }    }
# Line 673  public abstract class NumberFormat exten Line 673  public abstract class NumberFormat exten
673     * current maximum allowed digits, the maximum allowed digits value will     * current maximum allowed digits, the maximum allowed digits value will
674     * be raised to be equal to the new minimum allowed digits value.     * be raised to be equal to the new minimum allowed digits value.
675     *     *
676     * @param minimumFractionDigits The new minimum fraction digits value.     * @param digits The new minimum fraction digits value.
677     */     */
678    public void setMinimumFractionDigits (int newValue)    public void setMinimumFractionDigits (int digits)
679    {    {
680      minimumFractionDigits = newValue;      minimumFractionDigits = digits;
681      if (getMaximumFractionDigits () < minimumFractionDigits)      if (getMaximumFractionDigits () < minimumFractionDigits)
682        setMaximumFractionDigits (minimumFractionDigits);        setMaximumFractionDigits (minimumFractionDigits);
683    }    }
# Line 688  public abstract class NumberFormat exten Line 688  public abstract class NumberFormat exten
688     * current maximum allowed digits, the maximum allowed digits value will     * current maximum allowed digits, the maximum allowed digits value will
689     * be raised to be equal to the new minimum allowed digits value.     * be raised to be equal to the new minimum allowed digits value.
690     *     *
691     * @param minimumIntegerDigits The new minimum integer digits value.     * @param digits The new minimum integer digits value.
692     */     */
693    public void setMinimumIntegerDigits (int newValue)    public void setMinimumIntegerDigits (int digits)
694    {    {
695      minimumIntegerDigits = newValue;      minimumIntegerDigits = digits;
696      if (getMaximumIntegerDigits () < minimumIntegerDigits)      if (getMaximumIntegerDigits () < minimumIntegerDigits)
697        setMaximumIntegerDigits (minimumIntegerDigits);        setMaximumIntegerDigits (minimumIntegerDigits);
698    }    }
# Line 701  public abstract class NumberFormat exten Line 701  public abstract class NumberFormat exten
701     * This method sets the parsing behavior of this object to parse only     * This method sets the parsing behavior of this object to parse only
702     * integers or not.     * integers or not.
703     *     *
704     * @param parseIntegerOnly <code>true</code> to parse only integers,     * @param value <code>true</code> to parse only integers,
705     *                         <code>false</code> otherwise.     *                         <code>false</code> otherwise.
706     */     */
707    public void setParseIntegerOnly (boolean value)    public void setParseIntegerOnly (boolean value)

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26