61 * consists of three upper-case letters between 'A' (U+0041) and |
61 * consists of three upper-case letters between 'A' (U+0041) and |
62 * 'Z' (U+005A) |
62 * 'Z' (U+005A) |
63 * @param locale the desired locale |
63 * @param locale the desired locale |
64 * @return the symbol of the given currency code for the specified locale, or null if |
64 * @return the symbol of the given currency code for the specified locale, or null if |
65 * the symbol is not available for the locale |
65 * the symbol is not available for the locale |
66 * @throws NullPointerException if <code>currencyCode</code> or |
66 * @throws NullPointerException if {@code currencyCode} or |
67 * <code>locale</code> is null |
67 * {@code locale} is null |
68 * @throws IllegalArgumentException if <code>currencyCode</code> is not in |
68 * @throws IllegalArgumentException if {@code currencyCode} is not in |
69 * the form of three upper-case letters, or <code>locale</code> isn't |
69 * the form of three upper-case letters, or {@code locale} isn't |
70 * one of the locales returned from |
70 * one of the locales returned from |
71 * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales() |
71 * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales() |
72 * getAvailableLocales()}. |
72 * getAvailableLocales()}. |
73 * @see java.util.Currency#getSymbol(java.util.Locale) |
73 * @see java.util.Currency#getSymbol(java.util.Locale) |
74 */ |
74 */ |
82 * consists of three upper-case letters between 'A' (U+0041) and |
82 * consists of three upper-case letters between 'A' (U+0041) and |
83 * 'Z' (U+005A) |
83 * 'Z' (U+005A) |
84 * @param locale the desired locale |
84 * @param locale the desired locale |
85 * @return the name for the currency that is appropriate for display to the |
85 * @return the name for the currency that is appropriate for display to the |
86 * user, or null if the name is not available for the locale |
86 * user, or null if the name is not available for the locale |
87 * @throws IllegalArgumentException if <code>currencyCode</code> is not in |
87 * @throws IllegalArgumentException if {@code currencyCode} is not in |
88 * the form of three upper-case letters, or <code>locale</code> isn't |
88 * the form of three upper-case letters, or {@code locale} isn't |
89 * one of the locales returned from |
89 * one of the locales returned from |
90 * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales() |
90 * {@link java.util.spi.LocaleServiceProvider#getAvailableLocales() |
91 * getAvailableLocales()}. |
91 * getAvailableLocales()}. |
92 * @throws NullPointerException if <code>currencyCode</code> or |
92 * @throws NullPointerException if {@code currencyCode} or |
93 * <code>locale</code> is <code>null</code> |
93 * {@code locale} is {@code null} |
94 * @since 1.7 |
94 * @since 1.7 |
95 */ |
95 */ |
96 public String getDisplayName(String currencyCode, Locale locale) { |
96 public String getDisplayName(String currencyCode, Locale locale) { |
97 if (currencyCode == null || locale == null) { |
97 if (currencyCode == null || locale == null) { |
98 throw new NullPointerException(); |
98 throw new NullPointerException(); |