Class CalendarDataProvider
java.lang.Object
java.util.spi.LocaleServiceProvider
java.util.spi.CalendarDataProvider
An abstract class for service providers that provide locale-dependent
Calendar parameters.- Since:
- 1.8
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intgetFirstDayOfWeek(Locale locale) Returns the first day of a week in the givenlocale.abstract intgetMinimalDaysInFirstWeek(Locale locale) Returns the minimal number of days required in the first week of a year.Methods declared in class LocaleServiceProvider
getAvailableLocales, isSupportedLocaleModifier and TypeMethodDescriptionabstract Locale[]Returns an array of all locales for which this locale service provider can provide localized objects or names.booleanisSupportedLocale(Locale locale) Returnstrueif the givenlocaleis supported by this locale service provider.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.booleanIndicates whether some other object is "equal to" this one.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.inthashCode()Returns a hash code value for this object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final voidwait(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Constructor Details
-
CalendarDataProvider
protected CalendarDataProvider()Sole constructor. (For invocation by subclass constructors, typically implicit.)
-
-
Method Details
-
getFirstDayOfWeek
Returns the first day of a week in the givenlocale. This information is required byCalendarto support operations on the week-related calendar fields.- Parameters:
locale- the desired locale- Returns:
- the first day of a week; one of
Calendar.SUNDAY..Calendar.SATURDAY, or 0 if the value isn't available for thelocale - Throws:
NullPointerException- iflocaleisnull.- See Also:
-
getMinimalDaysInFirstWeek
Returns the minimal number of days required in the first week of a year. This information is required byCalendarto determine the first week of a year. Refer to the description of howCalendardetermines the first week.- Parameters:
locale- the desired locale- Returns:
- the minimal number of days of the first week,
or 0 if the value isn't available for the
locale - Throws:
NullPointerException- iflocaleisnull.- See Also:
-