mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8337285
: Examine java.text.DecimalFormat API for api/implXxx tag usage
Reviewed-by: naoto, liach
This commit is contained in:
parent
a86244f83c
commit
bd36b6ae5d
1 changed files with 27 additions and 30 deletions
|
@ -430,16 +430,15 @@ public class DecimalFormat extends NumberFormat {
|
||||||
* for the default {@link java.util.Locale.Category#FORMAT FORMAT} locale.
|
* for the default {@link java.util.Locale.Category#FORMAT FORMAT} locale.
|
||||||
* This is a convenient way to obtain a
|
* This is a convenient way to obtain a
|
||||||
* DecimalFormat when internationalization is not the main concern.
|
* 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.
|
|
||||||
*
|
*
|
||||||
* @see java.text.NumberFormat#getInstance
|
* @apiNote To obtain standard formats for a given locale, use the
|
||||||
* @see java.text.NumberFormat#getNumberInstance
|
* {@code NumberFormat} factory methods such as {@link
|
||||||
* @see java.text.NumberFormat#getCurrencyInstance
|
* NumberFormat#getNumberInstance(Locale)}. These factories will return the most
|
||||||
* @see java.text.NumberFormat#getPercentInstance
|
* appropriate subclass of NumberFormat for a given locale.
|
||||||
|
* @see NumberFormat#getInstance(Locale)
|
||||||
|
* @see NumberFormat#getNumberInstance(Locale)
|
||||||
|
* @see NumberFormat#getCurrencyInstance(Locale)
|
||||||
|
* @see NumberFormat#getPercentInstance(Locale)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("this-escape")
|
@SuppressWarnings("this-escape")
|
||||||
public DecimalFormat() {
|
public DecimalFormat() {
|
||||||
|
@ -464,19 +463,18 @@ public class DecimalFormat extends NumberFormat {
|
||||||
* DecimalFormat when internationalization is not the main concern.
|
* DecimalFormat when internationalization is not the main concern.
|
||||||
* The number of maximum integer digits is usually not derived from the pattern.
|
* The number of maximum integer digits is usually not derived from the pattern.
|
||||||
* See the note in the {@link ##patterns Patterns} section for more detail.
|
* See the note in the {@link ##patterns Patterns} section for more detail.
|
||||||
* <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.
|
|
||||||
*
|
*
|
||||||
|
* @apiNote To obtain standard formats for a given locale, use the
|
||||||
|
* {@code NumberFormat} factory methods such as {@link
|
||||||
|
* NumberFormat#getNumberInstance(Locale)}. These factories will return the most
|
||||||
|
* appropriate subclass of NumberFormat for a given locale.
|
||||||
* @param pattern a non-localized pattern string.
|
* @param pattern a non-localized pattern string.
|
||||||
* @throws NullPointerException if {@code pattern} is null
|
* @throws NullPointerException if {@code pattern} is null
|
||||||
* @throws IllegalArgumentException if the given pattern is invalid.
|
* @throws IllegalArgumentException if the given pattern is invalid.
|
||||||
* @see java.text.NumberFormat#getInstance
|
* @see NumberFormat#getInstance(Locale)
|
||||||
* @see java.text.NumberFormat#getNumberInstance
|
* @see NumberFormat#getNumberInstance(Locale)
|
||||||
* @see java.text.NumberFormat#getCurrencyInstance
|
* @see NumberFormat#getCurrencyInstance(Locale)
|
||||||
* @see java.text.NumberFormat#getPercentInstance
|
* @see NumberFormat#getPercentInstance(Locale)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("this-escape")
|
@SuppressWarnings("this-escape")
|
||||||
public DecimalFormat(String pattern) {
|
public DecimalFormat(String pattern) {
|
||||||
|
@ -492,21 +490,20 @@ public class DecimalFormat extends NumberFormat {
|
||||||
* behavior of the format.
|
* behavior of the format.
|
||||||
* The number of maximum integer digits is usually not derived from the pattern.
|
* The number of maximum integer digits is usually not derived from the pattern.
|
||||||
* See the note in the {@link ##patterns Patterns} section for more detail.
|
* See the note in the {@link ##patterns Patterns} section for more detail.
|
||||||
* <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.
|
|
||||||
*
|
*
|
||||||
|
* @apiNote To obtain standard formats for a given locale, use the
|
||||||
|
* {@code NumberFormat} factory methods such as {@link
|
||||||
|
* NumberFormat#getInstance(Locale)} or {@link NumberFormat#getCurrencyInstance(Locale)}.
|
||||||
|
* If you need only minor adjustments to a standard format, you can modify
|
||||||
|
* the format returned by a NumberFormat factory method.
|
||||||
* @param pattern a non-localized pattern string
|
* @param pattern a non-localized pattern string
|
||||||
* @param symbols the set of symbols to be used
|
* @param symbols the set of symbols to be used
|
||||||
* @throws NullPointerException if any of the given arguments is null
|
* @throws NullPointerException if any of the given arguments is null
|
||||||
* @throws IllegalArgumentException if the given pattern is invalid
|
* @throws IllegalArgumentException if the given pattern is invalid
|
||||||
* @see java.text.NumberFormat#getInstance
|
* @see NumberFormat#getInstance(Locale)
|
||||||
* @see java.text.NumberFormat#getNumberInstance
|
* @see NumberFormat#getNumberInstance(Locale)
|
||||||
* @see java.text.NumberFormat#getCurrencyInstance
|
* @see NumberFormat#getCurrencyInstance(Locale)
|
||||||
* @see java.text.NumberFormat#getPercentInstance
|
* @see NumberFormat#getPercentInstance(Locale)
|
||||||
* @see java.text.DecimalFormatSymbols
|
* @see java.text.DecimalFormatSymbols
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("this-escape")
|
@SuppressWarnings("this-escape")
|
||||||
|
@ -522,8 +519,8 @@ public class DecimalFormat extends NumberFormat {
|
||||||
* Formats a number and appends the resulting text to the given string
|
* Formats a number and appends the resulting text to the given string
|
||||||
* buffer.
|
* buffer.
|
||||||
* The number can be of any subclass of {@link java.lang.Number}.
|
* The number can be of any subclass of {@link java.lang.Number}.
|
||||||
* <p>
|
*
|
||||||
* This implementation uses the maximum precision permitted.
|
* @implSpec This implementation uses the maximum precision permitted.
|
||||||
* @param number the number to format
|
* @param number the number to format
|
||||||
* @param toAppendTo the {@code StringBuffer} to which the formatted
|
* @param toAppendTo the {@code StringBuffer} to which the formatted
|
||||||
* text is to be appended
|
* text is to be appended
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue