|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.motorola.iden.resourcebundle.Locale
A Locale
object represents a specific geographical, political,
or cultural region.
Create a Locale
object using the constructors in this class:
The language argument is a valid ISO Language Code. These codes are the lower-case, two-letter codes as defined by ISO-639.Locale(String language) Locale(String language, String country)
The country argument is a valid ISO Country Code. These codes are the upper-case, two-letter codes as defined by ISO-3166.
Because a Locale
object is just an identifier for a region,
no validity check is performed when you construct a Locale
.
Once you've created a Locale
you can query it for information about
itself. Use getCountry
to get the ISO Country Code and
getLanguage
to get the ISO Language Code.
ResourceBundle
Constructor Summary | |
Locale(String lang)
Construct a locale from a language code. |
|
Locale(String lang,
String coun)
Construct a locale from language, country. |
Method Summary | |
boolean |
equals(Object obj)
Returns true if this Locale is equal to another object. |
String |
getCountry()
Returns the country/region code for this locale. |
static Locale |
getDefault()
Gets the current value of the default locale for this instance of the Java Virtual Machine. |
String |
getLanguage()
Returns the language code for this locale. |
int |
hashCode()
Override hashCode. |
String |
toString()
Getter for the programmatic name of the entire locale, with the language and country separated by underbars. |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Locale(String lang, String coun)
NullPointerException
- thrown if either argument is null.public Locale(String lang)
NullPointerException
- thrown if argument is null.Method Detail |
public static Locale getDefault()
public String getLanguage()
public String getCountry()
public final String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
Object.equals(java.lang.Object)
,
Hashtable
public boolean equals(Object obj)
equals
in class Object
obj
- the reference object with which to compare.
Boolean.hashCode()
,
Hashtable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |