CalendarNameProvider
class for the JRE LocaleProviderAdapter.
Modifier and Type | Class and Description |
---|---|
private static class | CalendarNameProviderImpl.
Comparator implementation for TreeMap which iterates keys from longest to shortest. |
Modifier and Type | Field and Description |
---|---|
protected final Set | |
private static final int[] | |
protected final LocaleProviderAdapter. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public Set | getAvailableLanguageTags()
Implements sun. Returns a set of available language tags of a LocaleServiceProvider. |
public Locale[] | getAvailableLocales()
Implements abstract java. Returns an array of all locales for which this locale service provider can provide localized objects or names. |
private static int | |
public String | getDisplayName(String
the calendar type. (Any calendar type given by calendarType, int locale
is ignored.)the field, int Calendar field index,
such as Calendar#DAY_OF_WEEK the value of the value, int Calendar field ,
such as Calendar#MONDAY the string representation style: one of style, Locale Calendar#SHORT_FORMAT (SHORT ),
Calendar#SHORT_STANDALONE , Calendar#LONG_FORMAT (LONG ),
Calendar#LONG_STANDALONE ,
Calendar#NARROW_FORMAT ,
or Calendar#NARROW_STANDALONE the desired locale locale)Implements abstract java. Returns the string representation (display name) of the calendar
|
public String | getDisplayNameImpl(String calendarType, int field, int value, int style, Locale locale, boolean javatime)
|
public Map | getDisplayNames(String
the calendar type. (Any calendar type given by calendarType, int locale
is ignored.)the calendar field for which the display names are returned field, int the style applied to the display names; one of
style, Locale Calendar#ALL_STYLES , Calendar#SHORT_FORMAT
(SHORT ), Calendar#SHORT_STANDALONE , Calendar#LONG_FORMAT
(LONG ), Calendar#LONG_STANDALONE ,
Calendar#NARROW_FORMAT ,
or Calendar#NARROW_STANDALONE the desired locale locale)Implements abstract java. Returns a |
private Map | |
public String | |
public Map | |
private String | |
private static String | getResourceKeyFor(LocaleProviderAdapter.
|
private boolean | |
public boolean | isSupportedLocale(Locale
a locale)Locale to be testedOverrides java. Returns |
private static String |
langtags | back to summary |
---|---|
protected final Set<String> langtags |
REST_OF_STYLES | back to summary |
---|---|
private static final int[] REST_OF_STYLES |
type | back to summary |
---|---|
protected final LocaleProviderAdapter. |
CalendarNameProviderImpl | back to summary |
---|---|
public CalendarNameProviderImpl(LocaleProviderAdapter. |
getAvailableLanguageTags | back to summary |
---|---|
public Set Implements sun. Doc from sun. Returns a set of available language tags of a LocaleServiceProvider.
Note that the returned set doesn't contain the language tag for
|
getAvailableLocales | back to summary |
---|---|
public Locale[] getAvailableLocales() Implements abstract java. Doc from java. Returns an array of all locales for which this locale service provider
can provide localized objects or names.
This information is used to compose The array returned by this method should not include two or more
|
getBaseStyle | back to summary |
---|---|
private static int getBaseStyle(int style) |
getDisplayName | back to summary |
---|---|
public String getDisplayName(String calendarType, int field, int value, int style, Locale locale) Implements abstract java. Doc from java. Returns the string representation (display name) of the calendar
For example, the following call will return getDisplayName("gregory", Calendar.DAY_OF_WEEK, Calendar.SUNDAY, Calendar.LONG_STANDALONE, Locale.ENGLISH);
|
getDisplayNameImpl | back to summary |
---|---|
public String getDisplayNameImpl(String calendarType, int field, int value, int style, Locale locale, boolean javatime) |
getDisplayNames | back to summary |
---|---|
public Map Implements abstract java. Doc from java. Returns a
For example, the following call will return a getDisplayNames("gregory", Calendar.MONTH, Calendar.ALL_STYLES, Locale.ENGLISH);
|
getDisplayNamesImpl | back to summary |
---|---|
private Map |
getJavaTimeDisplayName | back to summary |
---|---|
public String getJavaTimeDisplayName(String calendarType, int field, int value, int style, Locale locale) |
getJavaTimeDisplayNames | back to summary |
---|---|
public Map |
getResourceKey | back to summary |
---|---|
private String getResourceKey(String type, int field, int style, boolean javatime) |
getResourceKeyFor | back to summary |
---|---|
private static String getResourceKeyFor(LocaleProviderAdapter. |
hasDuplicates | back to summary |
---|---|
private boolean hasDuplicates(String[] strings) |
isSupportedLocale | back to summary |
---|---|
public boolean isSupportedLocale(Locale locale) Overrides java. Doc from java. Returns The default implementation returns |
toStyleName | back to summary |
---|---|
private static String toStyleName(int baseStyle) |
Modifier and Type | Field and Description |
---|---|
private static final CalendarNameProviderImpl. |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public int | compare(String
the first object to be compared. o1, String the second object to be compared. o2)Implements java. Compares its two arguments for order. |
INSTANCE | back to summary |
---|---|
private static final CalendarNameProviderImpl. |
LengthBasedComparator | back to summary |
---|---|
private LengthBasedComparator() |
compare | back to summary |
---|---|
public int compare(String o1, String o2) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that |