Top Description Constructors Methods
sun.util.spi

public abstract Class CalendarProvider

extends LocaleServiceProvider
Class Inheritance
Known Direct Subclasses
sun.util.locale.provider.CalendarProviderImpl
Imports
java.util.Calendar, .Locale, .TimeZone, java.util.spi.LocaleServiceProvider

An abstract class for service providers that provide instances of the Calendar class.
Since
1.8

Constructor Summary

AccessConstructor and Description
protected
CalendarProvider()

Sole constructor.

Method Summary

Modifier and TypeMethod and Description
public abstract Calendar

Returns:

a Calendar instance.
getInstance
(TimeZone
the time zone
zone
,
Locale
the desired locale
locale
)

Returns a new Calendar instance for the specified locale.

Inherited from java.util.spi.LocaleServiceProvider:
getAvailableLocalesisSupportedLocale

Constructor Detail

CalendarProviderback to summary
protected CalendarProvider()

Sole constructor. (For invocation by subclass constructors, typically implicit.)

Method Detail

getInstanceback to summary
public abstract Calendar getInstance(TimeZone zone, Locale locale)

Returns a new Calendar instance for the specified locale.

Parameters
zone:TimeZone

the time zone

locale:Locale

the desired locale

Returns:Calendar

a Calendar instance.

Exceptions
NullPointerException:
if locale is null
IllegalArgumentException:
if locale isn't one of the locales returned from getAvailableLocales().
See Also
java.util.Calendar#getInstance(java.util.Locale)