|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.livescribe.i18n.Locale
public class Locale
A Locale object represents a specific geographical, political,
or cultural region. An operation that requires a Locale to perform its task
is called locale-sensitive and uses the Locale to tailor information for the
user.
The language argument is a valid ISO Language Code. These codes are the lower-case, two-letter codes as defined by ISO-639. You can find a full list of these codes at a number of sites, such as: http://www.loc.gov/standards/iso639-2/englangn.html
The country argument is a valid ISO Country Code. These codes are the upper-case, two-letter codes as defined by ISO-3166. You can find a full list of these codes at a number of sites, such as: http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
Locale.toString() returns the programmatic name of
the entire locale with language, country and variant seperated by underscores
(_).If the language is missing, the string will begin with an underbar. If
both the language and country fields are missing, this function will return
the empty string, even if the variant field is filled in (you can't have a
locale with just a variant-- the variant must accompany a valid language or
country code). Examples: "en", "de_DE", "_GB", "en_US_WIN", "de__POSIX",
"fr__MAC"
| Field Summary | |
|---|---|
static String |
COUNTRY_CHINA
ISO 3166 code for China |
static String |
COUNTRY_FRANCE
ISO 3166 code for FRANCE |
static String |
COUNTRY_GB
ISO 3166 code for United Kingdom |
static String |
COUNTRY_GERMANY
ISO 3166 code for Germany |
static String |
COUNTRY_ITALY
ISO 3166 code for ITALY |
static String |
COUNTRY_JAPAN
ISO 3166 code for Japan |
static String |
COUNTRY_KOREA
ISO 3166 code for South Korea |
static String |
COUNTRY_MALAYSIA
ISO 3166 code for MALAYSIA |
static String |
COUNTRY_SPAIN
ISO 3166 code for SPAIN |
static String |
COUNTRY_US
ISO 3166 code for United States of America |
static Locale |
DE_DE
|
static Locale |
EN
Locale with language set to LANG_ENGLISH |
static Locale |
EN_GB
Locale with language set to LANG_ENGLISH and country set to
COUNTRY_GB |
static Locale |
EN_US
Locale with language set to LANG_ENGLISH and country set to
COUNTRY_US |
static Locale |
ES_ES
|
static Locale |
FR_FR
|
static Locale |
IT_IT
|
static Locale |
JA_JP
Locale with language set to LANG_JAPANESE and country set to
COUNTRY_JAPAN |
static Locale |
KO
|
static Locale |
KO_KR
|
static String |
LANG_CHINESE
ISO 639-2 code for Chinese Language |
static String |
LANG_ENGLISH
ISO 639-2 code for English Language |
static String |
LANG_FRENCH
ISO 639-2 code for French Language |
static String |
LANG_GERMAN
ISO 639-2 code for German Language |
static String |
LANG_ITALIAN
ISO 639-2 code for Italian Language |
static String |
LANG_JAPANESE
ISO 639-2 code for Japanese Language |
static String |
LANG_KOREAN
ISO 639-2 code for Korean Language |
static String |
LANG_MALAY
ISO 639-2 code for MALAY Language |
static String |
LANG_SPANISH
ISO 639-2 code for Spanish Language |
static Locale |
MS_MY
|
static Locale |
ZH
Locale with language set to LANG_CHINESE |
static Locale |
ZH_CN
Locale with language set to LANG_CHINESE and country set to
COUNTRY_CHINA |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Indicates whether some other object is "equal to" this one. |
String |
getCountry()
Gets the country/region code for this locale which will be the empty string or an uppercase ISO 3166 2-letter code. |
static Locale |
getDefault()
Gets the default locale of the platform. |
String |
getDisplayName()
Calls getDisplayName with the current system locale |
String |
getDisplayName(Locale locale)
Gets the display name of this locale in the native language of the locale passed in. |
String |
getLanguage()
Gets the language code for this locale which will be the empty string or a lower case ISO 639 code. |
static Locale |
getLocale(String lang,
String country,
String variant)
|
String |
getVariant()
Gets the variant code for this locale. |
int |
hashCode()
Returns a hash code value for the object. |
String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String LANG_ENGLISH
public static final String LANG_CHINESE
public static final String LANG_JAPANESE
public static final String LANG_KOREAN
public static final String LANG_GERMAN
public static final String LANG_FRENCH
public static final String LANG_ITALIAN
public static final String LANG_SPANISH
public static final String LANG_MALAY
public static final String COUNTRY_US
public static final String COUNTRY_GB
public static final String COUNTRY_CHINA
public static final String COUNTRY_JAPAN
public static final String COUNTRY_KOREA
public static final String COUNTRY_GERMANY
public static final String COUNTRY_FRANCE
public static final String COUNTRY_ITALY
public static final String COUNTRY_SPAIN
public static final String COUNTRY_MALAYSIA
public static final Locale EN
LANG_ENGLISH
public static final Locale EN_US
LANG_ENGLISH and country set to
COUNTRY_US
public static final Locale EN_GB
LANG_ENGLISH and country set to
COUNTRY_GB
public static final Locale ZH
LANG_CHINESE
public static final Locale ZH_CN
LANG_CHINESE and country set to
COUNTRY_CHINA
public static final Locale JA_JP
LANG_JAPANESE and country set to
COUNTRY_JAPAN
public static final Locale KO_KR
public static final Locale KO
public static final Locale DE_DE
public static final Locale FR_FR
public static final Locale IT_IT
public static final Locale ES_ES
public static final Locale MS_MY
| Method Detail |
|---|
public static Locale getLocale(String lang,
String country,
String variant)
public static Locale getDefault()
public String getLanguage()
public String getCountry()
public String getVariant()
public String getDisplayName(Locale locale)
locale -
public String getDisplayName()
public String toString()
ObjecttoString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class Objectpublic boolean equals(Object obj)
Object
The equals method implements an equivalence relation:
x,
x.equals(x) should return true.
x and
y, x.equals(y) should return
true if and only if y.equals(x) returns
true.
x,
y, and z, if x.equals(y)
returns true and y.equals(z) returns
true, then x.equals(z) should return
true.
x
and y, multiple invocations of x.equals(y)
consistently return true or consistently return
false, provided no information used in
equals comparisons on the object is modified.
x,
x.equals(null) should return false.
The equals method for class Object implements
the most discriminating possible equivalence relation on objects;
that is, for any reference values x and y,
this method returns true if and only if x and
y refer to the same object (x==y has the
value true).
equals in class Objectobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.Boolean.hashCode(),
Hashtablepublic int hashCode()
Objectjava.util.Hashtable.
The general contract of hashCode is:
hashCode method on each of
the two objects must produce the same integer result.
Object.equals(java.lang.Object)
method, then calling the hashCode method on each of the
two objects must produce distinct integer results. However, the
programmer should be aware that producing distinct integer results
for unequal objects may improve the performance of hashtables.
As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtable
|
PenProfile 2.x | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||