src/java.base/share/classes/java/text/spi/NumberFormatProvider.java
changeset 58288 48e480e56aad
parent 58242 94bb65cb37d3
child 58679 9c3209ff7550
equal deleted inserted replaced
58287:a7f16447085e 58288:48e480e56aad
    44      */
    44      */
    45     protected NumberFormatProvider() {
    45     protected NumberFormatProvider() {
    46     }
    46     }
    47 
    47 
    48     /**
    48     /**
    49      * Returns a new <code>NumberFormat</code> instance which formats
    49      * Returns a new {@code NumberFormat} instance which formats
    50      * monetary values for the specified locale.
    50      * monetary values for the specified locale.
    51      *
    51      *
    52      * @param locale the desired locale.
    52      * @param locale the desired locale.
    53      * @throws    NullPointerException if <code>locale</code> is null
    53      * @throws    NullPointerException if {@code locale} is null
    54      * @throws    IllegalArgumentException if <code>locale</code> isn't
    54      * @throws    IllegalArgumentException if {@code locale} isn't
    55      *     one of the locales returned from
    55      *     one of the locales returned from
    56      *     {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
    56      *     {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
    57      *     getAvailableLocales()}.
    57      *     getAvailableLocales()}.
    58      * @return a currency formatter
    58      * @return a currency formatter
    59      * @see java.text.NumberFormat#getCurrencyInstance(java.util.Locale)
    59      * @see java.text.NumberFormat#getCurrencyInstance(java.util.Locale)
    60      */
    60      */
    61     public abstract NumberFormat getCurrencyInstance(Locale locale);
    61     public abstract NumberFormat getCurrencyInstance(Locale locale);
    62 
    62 
    63     /**
    63     /**
    64      * Returns a new <code>NumberFormat</code> instance which formats
    64      * Returns a new {@code NumberFormat} instance which formats
    65      * integer values for the specified locale.
    65      * integer values for the specified locale.
    66      * The returned number format is configured to
    66      * The returned number format is configured to
    67      * round floating point numbers to the nearest integer using
    67      * round floating point numbers to the nearest integer using
    68      * half-even rounding (see {@link java.math.RoundingMode#HALF_EVEN HALF_EVEN})
    68      * half-even rounding (see {@link java.math.RoundingMode#HALF_EVEN HALF_EVEN})
    69      * for formatting, and to parse only the integer part of
    69      * for formatting, and to parse only the integer part of
    70      * an input string (see {@link
    70      * an input string (see {@link
    71      * java.text.NumberFormat#isParseIntegerOnly isParseIntegerOnly}).
    71      * java.text.NumberFormat#isParseIntegerOnly isParseIntegerOnly}).
    72      *
    72      *
    73      * @param locale the desired locale
    73      * @param locale the desired locale
    74      * @throws    NullPointerException if <code>locale</code> is null
    74      * @throws    NullPointerException if {@code locale} is null
    75      * @throws    IllegalArgumentException if <code>locale</code> isn't
    75      * @throws    IllegalArgumentException if {@code locale} isn't
    76      *     one of the locales returned from
    76      *     one of the locales returned from
    77      *     {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
    77      *     {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
    78      *     getAvailableLocales()}.
    78      *     getAvailableLocales()}.
    79      * @return a number format for integer values
    79      * @return a number format for integer values
    80      * @see java.text.NumberFormat#getIntegerInstance(java.util.Locale)
    80      * @see java.text.NumberFormat#getIntegerInstance(java.util.Locale)
    81      */
    81      */
    82     public abstract NumberFormat getIntegerInstance(Locale locale);
    82     public abstract NumberFormat getIntegerInstance(Locale locale);
    83 
    83 
    84     /**
    84     /**
    85      * Returns a new general-purpose <code>NumberFormat</code> instance for
    85      * Returns a new general-purpose {@code NumberFormat} instance for
    86      * the specified locale.
    86      * the specified locale.
    87      *
    87      *
    88      * @param locale the desired locale
    88      * @param locale the desired locale
    89      * @throws    NullPointerException if <code>locale</code> is null
    89      * @throws    NullPointerException if {@code locale} is null
    90      * @throws    IllegalArgumentException if <code>locale</code> isn't
    90      * @throws    IllegalArgumentException if {@code locale} isn't
    91      *     one of the locales returned from
    91      *     one of the locales returned from
    92      *     {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
    92      *     {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
    93      *     getAvailableLocales()}.
    93      *     getAvailableLocales()}.
    94      * @return a general-purpose number formatter
    94      * @return a general-purpose number formatter
    95      * @see java.text.NumberFormat#getNumberInstance(java.util.Locale)
    95      * @see java.text.NumberFormat#getNumberInstance(java.util.Locale)
    96      */
    96      */
    97     public abstract NumberFormat getNumberInstance(Locale locale);
    97     public abstract NumberFormat getNumberInstance(Locale locale);
    98 
    98 
    99     /**
    99     /**
   100      * Returns a new <code>NumberFormat</code> instance which formats
   100      * Returns a new {@code NumberFormat} instance which formats
   101      * percentage values for the specified locale.
   101      * percentage values for the specified locale.
   102      *
   102      *
   103      * @param locale the desired locale
   103      * @param locale the desired locale
   104      * @throws    NullPointerException if <code>locale</code> is null
   104      * @throws    NullPointerException if {@code locale} is null
   105      * @throws    IllegalArgumentException if <code>locale</code> isn't
   105      * @throws    IllegalArgumentException if {@code locale} isn't
   106      *     one of the locales returned from
   106      *     one of the locales returned from
   107      *     {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
   107      *     {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()
   108      *     getAvailableLocales()}.
   108      *     getAvailableLocales()}.
   109      * @return a percent formatter
   109      * @return a percent formatter
   110      * @see java.text.NumberFormat#getPercentInstance(java.util.Locale)
   110      * @see java.text.NumberFormat#getPercentInstance(java.util.Locale)