public interface GwtLocale extends Comparable<GwtLocale>
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_LOCALE |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(GwtLocale o)
The default comparison is a lexical ordering.
|
List<GwtLocale> |
getAliases()
Returns the list of aliases for this locale.
|
String |
getAsString()
Returns the locale as a fixed-format string suitable for use in searching
for localized resources.
|
GwtLocale |
getCanonicalForm()
Returns this locale in canonical form.
|
List<GwtLocale> |
getCompleteSearchList()
Returns the complete list of locales to search for the current locale.
|
List<GwtLocale> |
getInheritanceChain()
Returns a list of locales to search for, in order of preference.
|
String |
getLanguage()
Returns the language portion of the locale, or null if none.
|
String |
getLanguageNotNull()
Returns the language portion of the locale, or the empty string if none.
|
String |
getRegion()
Returns the region portion of the locale, or null if none.
|
String |
getRegionNotNull()
Returns the region portion of the locale, or the empty string if none.
|
String |
getScript()
Returns the script portion of the locale, or null if none.
|
String |
getScriptNotNull()
Returns the script portion of the locale, or the empty string if none.
|
String |
getVariant()
Returns the variant portion of the locale, or null if none.
|
String |
getVariantNotNull()
Returns the variant portion of the locale, or the empty string if none.
|
boolean |
inheritsFrom(GwtLocale parent)
Returns true if this locale inherits from the specified locale.
|
boolean |
isDefault()
Returns true if this is the default or root locale.
|
String |
toString()
Returns a human readable string -- "default" or the same as getAsString().
|
boolean |
usesSameScript(GwtLocale other)
Checks if this locale uses the same script as another locale.
|
static final String DEFAULT_LOCALE
int compareTo(GwtLocale o)
compareTo
in interface Comparable<GwtLocale>
List<GwtLocale> getAliases()
String getAsString()
GwtLocale getCanonicalForm()
List<GwtLocale> getCompleteSearchList()
List<GwtLocale> getInheritanceChain()
getAliases()
to expand those.String getLanguage()
String getLanguageNotNull()
String getRegion()
String getRegionNotNull()
String getScript()
String getScriptNotNull()
String getVariant()
String getVariantNotNull()
boolean inheritsFrom(GwtLocale parent)
parent
- locale to test againstboolean isDefault()
String toString()
boolean usesSameScript(GwtLocale other)
other
- Copyright © 2016. All rights reserved.