Package net.time4j.format
Interface TextProvider
public interface TextProvider
This SPI-interface enables the access to calendrical
 standard text informations and will be instantiated by a
 ServiceLoader-mechanism. 
The motivation is mainly to override the language-dependent forms of JDK-defaults with respect to standard elements like months, weekdays etc. Specific text forms which are not contained in JDK will instead be supplied by help of properties-files in the "data"-folder.
Note: All implementations must have a public no-arg constructor.
- Since:
- 2.0
- Author:
- Meno Hochschild
- See Also:
- ServiceLoader
- 
Method SummaryModifier and TypeMethodDescriptionString[]Locale[]Yields the supported languages.String[]Defines the supported calendar types.String[]meridiems(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext)String[]months(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext, boolean leapForm)String[]quarters(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext)booleansupportsCalendarType(String calendarType)Queries if a calendar type is supported by this text provider.booleansupportsLanguage(Locale language)Queries if a language is supported by this text provider.String[]weekdays(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext)
- 
Method Details- 
supportsCalendarTypeQueries if a calendar type is supported by this text provider. - Parameters:
- calendarType- the calendar type to be checked
- Returns:
- trueif given calendar type is supported else- false
- Since:
- 3.32/4.27
- See Also:
- CalendarType
 
- 
supportsLanguageQueries if a language is supported by this text provider. - Parameters:
- language- the language to be checked
- Returns:
- trueif given language is supported else- false
- Since:
- 3.32/4.27
 
- 
getSupportedCalendarTypesString[] getSupportedCalendarTypes()Defines the supported calendar types. - Returns:
- String-array with calendar types
- See Also:
- CalendarType
 
- 
getAvailableLocalesLocale[] getAvailableLocales()Yields the supported languages. Only the language part will be evaluated. - Returns:
- Locale-array
- See Also:
- Locale.getLanguage()
 
- 
monthsString[] months(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext, boolean leapForm)- Parameters:
- calendarType- calendar type
- locale- language of text output
- textWidth- text width
- outputContext- output context
- leapForm- use leap form (for example the hebrew month "Adar II")?
- Returns:
- unmodifiable sorted array of month names
 
- 
quartersString[] quarters(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext)- Parameters:
- calendarType- calendar type
- locale- language of text output
- textWidth- text width
- outputContext- output context
- Returns:
- unmodifiable sorted array of quarter names
 
- 
weekdaysString[] weekdays(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext)- Parameters:
- calendarType- calendar type
- locale- language of text output
- textWidth- text width
- outputContext- output context
- Returns:
- unmodifiable sorted array of weekday names in calendar specific order (ISO-8601 starts with monday)
 
- 
eras- Parameters:
- calendarType- calendar type
- locale- language of text output
- textWidth- text width
- Returns:
- unmodifiable sorted array of era names
 
- 
meridiemsString[] meridiems(String calendarType, Locale locale, TextWidth textWidth, OutputContext outputContext)- Parameters:
- calendarType- calendar type
- locale- language of text output
- textWidth- text width
- outputContext- output context
- Returns:
- unmodifiable sorted array of AM/PM-names
 
 
-