public static class LocaleDisplayNames.UiListItem
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
ULocale |
minimized |
Returns the minimized locale for an input locale, such as sr-Cyrl → sr
|
ULocale |
modified |
Returns the modified locale for an input locale, such as sr → sr-Cyrl, where there is also an sr-Latn in the list
|
java.lang.String |
nameInDisplayLocale |
Returns the name of the modified locale in the display locale, such as "Englisch (VS)" (for 'en-US', where the display locale is 'de').
|
java.lang.String |
nameInSelf |
Returns the name of the modified locale in itself, such as "English (US)" (for 'en-US').
|
Constructor | Description |
---|---|
UiListItem(ULocale minimized,
ULocale modified,
java.lang.String nameInDisplayLocale,
java.lang.String nameInSelf) |
Constructor, normally only called internally.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object obj) |
|
static java.util.Comparator<LocaleDisplayNames.UiListItem> |
getComparator(java.util.Comparator<java.lang.Object> comparator,
boolean inSelf) |
Return a comparator that compares the locale names for the display locale or the in-self names,
depending on an input parameter.
|
int |
hashCode() |
|
java.lang.String |
toString() |
public final ULocale minimized
public final ULocale modified
public final java.lang.String nameInDisplayLocale
public final java.lang.String nameInSelf
public UiListItem(ULocale minimized, ULocale modified, java.lang.String nameInDisplayLocale, java.lang.String nameInSelf)
minimized
- locale for an input localemodified
- modified for an input localenameInDisplayLocale
- name of the modified locale in the display localenameInSelf
- name of the modified locale in itselfpublic boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static java.util.Comparator<LocaleDisplayNames.UiListItem> getComparator(java.util.Comparator<java.lang.Object> comparator, boolean inSelf)
inSelf
- if true, compares the nameInSelf, otherwise the nameInDisplayLocalecomparator
- (meant for strings, but because Java Collator doesn't have <String>...)Copyright ? 2016 Unicode, Inc. and others.