public interface GwtLocale extends java.lang.Comparable<GwtLocale>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_LOCALE |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(GwtLocale o)
The default comparison is a lexical ordering.
|
java.util.List<GwtLocale> |
getAliases()
Returns the list of aliases for this locale.
|
java.lang.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.
|
java.util.List<GwtLocale> |
getCompleteSearchList()
Returns the complete list of locales to search for the current locale.
|
java.util.List<GwtLocale> |
getInheritanceChain()
Returns a list of locales to search for, in order of preference.
|
java.lang.String |
getLanguage()
Returns the language portion of the locale, or null if none.
|
java.lang.String |
getLanguageNotNull()
Returns the language portion of the locale, or the empty string if none.
|
java.lang.String |
getRegion()
Returns the region portion of the locale, or null if none.
|
java.lang.String |
getRegionNotNull()
Returns the region portion of the locale, or the empty string if none.
|
java.lang.String |
getScript()
Returns the script portion of the locale, or null if none.
|
java.lang.String |
getScriptNotNull()
Returns the script portion of the locale, or the empty string if none.
|
java.lang.String |
getVariant()
Returns the variant portion of the locale, or null if none.
|
java.lang.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.
|
java.lang.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 java.lang.String DEFAULT_LOCALE
int compareTo(GwtLocale o)
compareTo
in interface java.lang.Comparable<GwtLocale>
java.util.List<GwtLocale> getAliases()
java.lang.String getAsString()
GwtLocale getCanonicalForm()
java.util.List<GwtLocale> getCompleteSearchList()
java.util.List<GwtLocale> getInheritanceChain()
getAliases()
to expand those.java.lang.String getLanguage()
java.lang.String getLanguageNotNull()
java.lang.String getRegion()
java.lang.String getRegionNotNull()
java.lang.String getScript()
java.lang.String getScriptNotNull()
java.lang.String getVariant()
java.lang.String getVariantNotNull()
boolean inheritsFrom(GwtLocale parent)
parent
- locale to test againstboolean isDefault()
java.lang.String toString()
toString
in class java.lang.Object
boolean usesSameScript(GwtLocale other)
other
-