src/java.base/share/classes/java/util/spi/CurrencyNameProvider.java
changeset 58242 94bb65cb37d3
parent 47216 71c04702a3d5
child 58288 48e480e56aad
equal deleted inserted replaced
58241:33de7752835c 58242:94bb65cb37d3
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    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      * @exception NullPointerException if <code>currencyCode</code> or
    66      * @throws    NullPointerException if <code>currencyCode</code> or
    67      *     <code>locale</code> is null
    67      *     <code>locale</code> is null
    68      * @exception IllegalArgumentException if <code>currencyCode</code> is not in
    68      * @throws    IllegalArgumentException if <code>currencyCode</code> 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</code> 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)
    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      * @exception IllegalArgumentException if <code>currencyCode</code> is not in
    87      * @throws    IllegalArgumentException if <code>currencyCode</code> 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</code> 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      * @exception NullPointerException if <code>currencyCode</code> or
    92      * @throws    NullPointerException if <code>currencyCode</code> or
    93      *     <code>locale</code> is <code>null</code>
    93      *     <code>locale</code> is <code>null</code>
    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) {