equal
deleted
inserted
replaced
287 /** |
287 /** |
288 * Returns the <code>Currency</code> instance for the given currency code. |
288 * Returns the <code>Currency</code> instance for the given currency code. |
289 * |
289 * |
290 * @param currencyCode the ISO 4217 code of the currency |
290 * @param currencyCode the ISO 4217 code of the currency |
291 * @return the <code>Currency</code> instance for the given currency code |
291 * @return the <code>Currency</code> instance for the given currency code |
292 * @exception NullPointerException if <code>currencyCode</code> is null |
292 * @throws NullPointerException if <code>currencyCode</code> is null |
293 * @exception IllegalArgumentException if <code>currencyCode</code> is not |
293 * @throws IllegalArgumentException if <code>currencyCode</code> is not |
294 * a supported ISO 4217 code. |
294 * a supported ISO 4217 code. |
295 */ |
295 */ |
296 public static Currency getInstance(String currencyCode) { |
296 public static Currency getInstance(String currencyCode) { |
297 return getInstance(currencyCode, Integer.MIN_VALUE, 0); |
297 return getInstance(currencyCode, Integer.MIN_VALUE, 0); |
298 } |
298 } |
370 * |
370 * |
371 * @param locale the locale for whose country a <code>Currency</code> |
371 * @param locale the locale for whose country a <code>Currency</code> |
372 * instance is needed |
372 * instance is needed |
373 * @return the <code>Currency</code> instance for the country of the given |
373 * @return the <code>Currency</code> instance for the country of the given |
374 * locale, or {@code null} |
374 * locale, or {@code null} |
375 * @exception NullPointerException if <code>locale</code> |
375 * @throws NullPointerException if <code>locale</code> |
376 * is {@code null} |
376 * is {@code null} |
377 * @exception IllegalArgumentException if the country of the given {@code locale} |
377 * @throws IllegalArgumentException if the country of the given {@code locale} |
378 * is not a supported ISO 3166 country code. |
378 * is not a supported ISO 3166 country code. |
379 */ |
379 */ |
380 public static Currency getInstance(Locale locale) { |
380 public static Currency getInstance(Locale locale) { |
381 // check for locale overrides |
381 // check for locale overrides |
382 String override = locale.getUnicodeLocaleType("cu"); |
382 String override = locale.getUnicodeLocaleType("cu"); |
535 * the value specified with that extension. |
535 * the value specified with that extension. |
536 * |
536 * |
537 * @param locale the locale for which a display name for this currency is |
537 * @param locale the locale for which a display name for this currency is |
538 * needed |
538 * needed |
539 * @return the symbol of this currency for the specified locale |
539 * @return the symbol of this currency for the specified locale |
540 * @exception NullPointerException if <code>locale</code> is null |
540 * @throws NullPointerException if <code>locale</code> is null |
541 */ |
541 */ |
542 public String getSymbol(Locale locale) { |
542 public String getSymbol(Locale locale) { |
543 LocaleServiceProviderPool pool = |
543 LocaleServiceProviderPool pool = |
544 LocaleServiceProviderPool.getPool(CurrencyNameProvider.class); |
544 LocaleServiceProviderPool.getPool(CurrencyNameProvider.class); |
545 locale = CalendarDataUtility.findRegionOverride(locale); |
545 locale = CalendarDataUtility.findRegionOverride(locale); |
630 * for the specified locale, the ISO 4217 currency code is returned. |
630 * for the specified locale, the ISO 4217 currency code is returned. |
631 * |
631 * |
632 * @param locale the locale for which a display name for this currency is |
632 * @param locale the locale for which a display name for this currency is |
633 * needed |
633 * needed |
634 * @return the display name of this currency for the specified locale |
634 * @return the display name of this currency for the specified locale |
635 * @exception NullPointerException if <code>locale</code> is null |
635 * @throws NullPointerException if <code>locale</code> is null |
636 * @since 1.7 |
636 * @since 1.7 |
637 */ |
637 */ |
638 public String getDisplayName(Locale locale) { |
638 public String getDisplayName(Locale locale) { |
639 LocaleServiceProviderPool pool = |
639 LocaleServiceProviderPool pool = |
640 LocaleServiceProviderPool.getPool(CurrencyNameProvider.class); |
640 LocaleServiceProviderPool.getPool(CurrencyNameProvider.class); |
1195 } |
1195 } |
1196 |
1196 |
1197 } |
1197 } |
1198 |
1198 |
1199 } |
1199 } |
1200 |
|
1201 |
|