Java Code Examples for sun.util.locale.provider.LocaleProviderAdapter#getDecimalFormatSymbolsProvider()
The following examples show how to use
sun.util.locale.provider.LocaleProviderAdapter#getDecimalFormatSymbolsProvider() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DecimalFormatSymbols.java From openjdk-jdk9 with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 2
Source File: DecimalFormatSymbols.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 3
Source File: DecimalFormatSymbols.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 4
Source File: DecimalFormatSymbols.java From jdk8u_jdk with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 5
Source File: DecimalFormatSymbols.java From openjdk-8 with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 6
Source File: DecimalFormatSymbols.java From openjdk-8-source with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 7
Source File: DecimalFormatSymbols.java From hottub with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 8
Source File: DecimalFormatSymbols.java From Java8CN with Apache License 2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 9
Source File: DecimalFormatSymbols.java From jdk8u-jdk with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 10
Source File: DecimalFormatSymbols.java From jdk1.8-source-analysis with Apache License 2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 11
Source File: DecimalFormatSymbols.java From Bytecoder with Apache License 2.0 | 3 votes |
/** * Gets the {@code DecimalFormatSymbols} instance for the specified * locale. This method provides access to {@code DecimalFormatSymbols} * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a {@code DecimalFormatSymbols} instance. * @throws NullPointerException if {@code locale} is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 12
Source File: DecimalFormatSymbols.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 13
Source File: DecimalFormatSymbols.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 14
Source File: DecimalFormatSymbols.java From JDKSourceCode1.8 with MIT License | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 15
Source File: DecimalFormatSymbols.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 16
Source File: DecimalFormatSymbols.java From TencentKona-8 with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }
Example 17
Source File: DecimalFormatSymbols.java From dragonwell8_jdk with GNU General Public License v2.0 | 3 votes |
/** * Gets the <code>DecimalFormatSymbols</code> instance for the specified * locale. This method provides access to <code>DecimalFormatSymbols</code> * instances for locales supported by the Java runtime itself as well * as for those supported by installed * {@link java.text.spi.DecimalFormatSymbolsProvider * DecimalFormatSymbolsProvider} implementations. * If the specified locale contains the {@link java.util.Locale#UNICODE_LOCALE_EXTENSION} * for the numbering system, the instance is initialized with the specified numbering * system if the JRE implementation supports it. For example, * <pre> * NumberFormat.getNumberInstance(Locale.forLanguageTag("th-TH-u-nu-thai")) * </pre> * This may return a {@code NumberFormat} instance with the Thai numbering system, * instead of the Latin numbering system. * * @param locale the desired locale. * @return a <code>DecimalFormatSymbols</code> instance. * @exception NullPointerException if <code>locale</code> is null * @since 1.6 */ public static final DecimalFormatSymbols getInstance(Locale locale) { LocaleProviderAdapter adapter; adapter = LocaleProviderAdapter.getAdapter(DecimalFormatSymbolsProvider.class, locale); DecimalFormatSymbolsProvider provider = adapter.getDecimalFormatSymbolsProvider(); DecimalFormatSymbols dfsyms = provider.getInstance(locale); if (dfsyms == null) { provider = LocaleProviderAdapter.forJRE().getDecimalFormatSymbolsProvider(); dfsyms = provider.getInstance(locale); } return dfsyms; }