|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.gwt.i18n.server.GwtLocaleImpl
public class GwtLocaleImpl
Class representing GWT locales and conversion to/from other formats. These locales correspond to BCP47.
| Field Summary |
|---|
| Fields inherited from interface com.google.gwt.i18n.shared.GwtLocale |
|---|
DEFAULT_LOCALE |
| Constructor Summary | |
|---|---|
GwtLocaleImpl(GwtLocaleFactory factory,
java.lang.String language,
java.lang.String region,
java.lang.String script,
java.lang.String variant)
Must only be called from a factory to preserve instance caching. |
|
| Method Summary | |
|---|---|
int |
compareTo(GwtLocale o)
The default comparison is a lexical ordering. |
boolean |
equals(java.lang.Object obj)
|
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()
Return 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. |
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. |
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, taking into account default scripts. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
GwtLocaleImpl(GwtLocaleFactory factory,
java.lang.String language,
java.lang.String region,
java.lang.String script,
java.lang.String variant)
| Method Detail |
|---|
public int compareTo(GwtLocale o)
GwtLocale
compareTo in interface GwtLocalecompareTo in interface java.lang.Comparable<GwtLocale>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.util.List<GwtLocale> getAliases()
GwtLocale
getAliases in interface GwtLocalepublic java.lang.String getAsString()
GwtLocale
getAsString in interface GwtLocalepublic GwtLocale getCanonicalForm()
getCanonicalForm in interface GwtLocalepublic java.util.List<GwtLocale> getCompleteSearchList()
GwtLocale
getCompleteSearchList in interface GwtLocalepublic java.util.List<GwtLocale> getInheritanceChain()
getAliases() to expand those.
getInheritanceChain in interface GwtLocalepublic java.lang.String getLanguage()
GwtLocale
getLanguage in interface GwtLocalepublic java.lang.String getLanguageNotNull()
GwtLocale
getLanguageNotNull in interface GwtLocalepublic java.lang.String getRegion()
GwtLocale
getRegion in interface GwtLocalepublic java.lang.String getRegionNotNull()
GwtLocale
getRegionNotNull in interface GwtLocalepublic java.lang.String getScript()
GwtLocale
getScript in interface GwtLocalepublic java.lang.String getScriptNotNull()
GwtLocale
getScriptNotNull in interface GwtLocalepublic java.lang.String getVariant()
GwtLocale
getVariant in interface GwtLocalepublic java.lang.String getVariantNotNull()
GwtLocale
getVariantNotNull in interface GwtLocalepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean inheritsFrom(GwtLocale parent)
inheritsFrom in interface GwtLocaleparent - locale to test against
public boolean isDefault()
GwtLocale
isDefault in interface GwtLocalepublic java.lang.String toString()
GwtLocale
toString in interface GwtLocaletoString in class java.lang.Objectpublic boolean usesSameScript(GwtLocale other)
usesSameScript in interface GwtLocaleother -
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||