public class GwtLocaleImpl extends Object implements GwtLocale
DEFAULT_LOCALE
Modifier and Type | Method and Description |
---|---|
int |
compareTo(GwtLocale o)
The default comparison is a lexical ordering.
|
boolean |
equals(Object obj) |
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()
Return 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.
|
int |
hashCode() |
boolean |
inheritsFrom(GwtLocale parent)
Return 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, taking into
account default scripts.
|
public int compareTo(GwtLocale o)
GwtLocale
compareTo
in interface GwtLocale
compareTo
in interface Comparable<GwtLocale>
public List<GwtLocale> getAliases()
GwtLocale
getAliases
in interface GwtLocale
public String getAsString()
GwtLocale
getAsString
in interface GwtLocale
public GwtLocale getCanonicalForm()
getCanonicalForm
in interface GwtLocale
public List<GwtLocale> getCompleteSearchList()
GwtLocale
getCompleteSearchList
in interface GwtLocale
public List<GwtLocale> getInheritanceChain()
getAliases()
to expand those.getInheritanceChain
in interface GwtLocale
public String getLanguage()
GwtLocale
getLanguage
in interface GwtLocale
public String getLanguageNotNull()
GwtLocale
getLanguageNotNull
in interface GwtLocale
public String getRegion()
GwtLocale
public String getRegionNotNull()
GwtLocale
getRegionNotNull
in interface GwtLocale
public String getScript()
GwtLocale
public String getScriptNotNull()
GwtLocale
getScriptNotNull
in interface GwtLocale
public String getVariant()
GwtLocale
getVariant
in interface GwtLocale
public String getVariantNotNull()
GwtLocale
getVariantNotNull
in interface GwtLocale
public boolean inheritsFrom(GwtLocale parent)
inheritsFrom
in interface GwtLocale
parent
- locale to test againstpublic boolean isDefault()
GwtLocale
public String toString()
GwtLocale
public boolean usesSameScript(GwtLocale other)
usesSameScript
in interface GwtLocale
other
- Copyright © 2018. All rights reserved.