APIdia Launch Partner
Top Description Fields Constructors Methods
sun.util.locale.provider

public Class CalendarDataProviderImpl

extends CalendarDataProvider
implements AvailableLanguageTags
Class Inheritance
All Implemented Interfaces
sun.util.locale.provider.AvailableLanguageTags
Known Direct Subclasses
sun.util.cldr.CLDRCalendarDataProviderImpl
Imports
java.util.Locale, .Set, java.util.spi.CalendarDataProvider

Concrete implementation of the CalendarDataProvider class for the JRE LocaleProviderAdapter.
Authors
Masayoshi Okutsu, Naoto Sato

Field Summary

Modifier and TypeField and Description
private final Set<String>
private final LocaleProviderAdapter.Type

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private int
public Set<String>
getAvailableLanguageTags()

Implements sun.util.locale.provider.AvailableLanguageTags.getAvailableLanguageTags.

Returns a set of available language tags of a LocaleServiceProvider.

public Locale[]
getAvailableLocales()

Implements abstract java.util.spi.LocaleServiceProvider.getAvailableLocales.

Returns an array of all locales for which this locale service provider can provide localized objects or names.

public int
getFirstDayOfWeek(Locale locale)

Implements abstract java.util.spi.CalendarDataProvider.getFirstDayOfWeek.

Returns the first day of a week in the given locale.

public int
getMinimalDaysInFirstWeek(Locale locale)

Implements abstract java.util.spi.CalendarDataProvider.getMinimalDaysInFirstWeek.

Returns the minimal number of days required in the first week of a year.

Field Detail

langtagsback to summary
private final Set<String> langtags
typeback to summary
private final LocaleProviderAdapter.Type type

Constructor Detail

CalendarDataProviderImplback to summary
public CalendarDataProviderImpl(LocaleProviderAdapter.Type type, Set<String> langtags)

Method Detail

convertToCalendarDataback to summary
private int convertToCalendarData(String src)
getAvailableLanguageTagsback to summary
public Set<String> getAvailableLanguageTags()

Implements sun.util.locale.provider.AvailableLanguageTags.getAvailableLanguageTags.

Doc from sun.util.locale.provider.AvailableLanguageTags.getAvailableLanguageTags.

Returns a set of available language tags of a LocaleServiceProvider. Note that the returned set doesn't contain the language tag for Locale.Root.

Annotations
@Override
getAvailableLocalesback to summary
public Locale[] getAvailableLocales()

Implements abstract java.util.spi.LocaleServiceProvider.getAvailableLocales.

Doc from java.util.spi.LocaleServiceProvider.getAvailableLocales.

Returns an array of all locales for which this locale service provider can provide localized objects or names. This information is used to compose getAvailableLocales() values of the locale-dependent services, such as DateFormat.getAvailableLocales().

The array returned by this method should not include two or more Locale objects only differing in their extensions.

Annotations
@Override
getFirstDayOfWeekback to summary
public int getFirstDayOfWeek(Locale locale)

Implements abstract java.util.spi.CalendarDataProvider.getFirstDayOfWeek.

Doc from java.util.spi.CalendarDataProvider.getFirstDayOfWeek.

Returns the first day of a week in the given locale. This information is required by Calendar to support operations on the week-related calendar fields.

Annotations
@Override
getMinimalDaysInFirstWeekback to summary
public int getMinimalDaysInFirstWeek(Locale locale)

Implements abstract java.util.spi.CalendarDataProvider.getMinimalDaysInFirstWeek.

Doc from java.util.spi.CalendarDataProvider.getMinimalDaysInFirstWeek.

Returns the minimal number of days required in the first week of a year. This information is required by Calendar to determine the first week of a year. Refer to the description of how Calendar determines the first week.

Annotations
@Override