Path: blob/master/src/java.base/share/classes/java/text/spi/DecimalFormatSymbolsProvider.java
41159 views
/*1* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package java.text.spi;2627import java.text.DecimalFormatSymbols;28import java.util.Locale;29import java.util.spi.LocaleServiceProvider;3031/**32* An abstract class for service providers that33* provide instances of the34* {@link java.text.DecimalFormatSymbols DecimalFormatSymbols} class.35*36* <p>The requested {@code Locale} may contain an <a37* href="../../util/Locale.html#def_locale_extension"> extension</a> for38* specifying the desired numbering system. For example, {@code "ar-u-nu-arab"}39* (in the BCP 47 language tag form) specifies Arabic with the Arabic-Indic40* digits and symbols, while {@code "ar-u-nu-latn"} specifies Arabic with the41* Latin digits and symbols. Refer to the <em>Unicode Locale Data Markup42* Language (LDML)</em> specification for numbering systems.43*44* @since 1.645* @see Locale#forLanguageTag(String)46* @see Locale#getExtension(char)47*/48public abstract class DecimalFormatSymbolsProvider extends LocaleServiceProvider {4950/**51* Sole constructor. (For invocation by subclass constructors, typically52* implicit.)53*/54protected DecimalFormatSymbolsProvider() {55}5657/**58* Returns a new {@code DecimalFormatSymbols} instance for the59* specified locale.60*61* @param locale the desired locale62* @throws NullPointerException if {@code locale} is null63* @throws IllegalArgumentException if {@code locale} isn't64* one of the locales returned from65* {@link java.util.spi.LocaleServiceProvider#getAvailableLocales()66* getAvailableLocales()}.67* @return a {@code DecimalFormatSymbols} instance.68* @see java.text.DecimalFormatSymbols#getInstance(java.util.Locale)69*/70public abstract DecimalFormatSymbols getInstance(Locale locale);71}727374