java.util
Class Locale

java.lang.Object
  |
  +--java.util.Locale
All Implemented Interfaces:
Cloneable, java.io.Serializable

public final synchronized class Locale
extends Object
implements Cloneable, java.io.Serializable


Field Summary
static Locale CANADA
           
static Locale CANADA_FRENCH
           
static Locale CHINA
           
static Locale CHINESE
           
static Locale ENGLISH
           
static Locale FRANCE
           
static Locale FRENCH
           
static Locale GERMAN
           
static Locale GERMANY
           
static Locale ITALIAN
           
static Locale ITALY
           
static Locale JAPAN
           
static Locale JAPANESE
           
static Locale KOREA
           
static Locale KOREAN
           
static Locale PRC
           
static Locale SIMPLIFIED_CHINESE
           
static Locale TAIWAN
           
static Locale TRADITIONAL_CHINESE
           
static Locale UK
           
static Locale US
           
 
Constructor Summary
Locale(String)
           
Locale(String, String)
           
Locale(String, String, String)
           
 
Method Summary
 Object clone()
           
 boolean equals(Object)
          Determines if this object is "equal" to another object.
static Locale[] getAvailableLocales()
           
 String getCountry()
           
static Locale getDefault()
           
 String getDisplayCountry()
           
 String getDisplayCountry(Locale)
           
 String getDisplayLanguage()
           
 String getDisplayLanguage(Locale)
           
 String getDisplayName()
           
 String getDisplayName(Locale)
           
 String getDisplayVariant()
           
 String getDisplayVariant(Locale)
           
 String getISO3Country()
           
 String getISO3Language()
           
static String[] getISOCountries()
           
static String[] getISOLanguages()
           
 String getLanguage()
           
 String getVariant()
           
 int hashCode()
           
static void setDefault(Locale)
           
 String toString()
           
 

Field Detail

ENGLISH

public static final Locale ENGLISH

FRENCH

public static final Locale FRENCH

GERMAN

public static final Locale GERMAN

ITALIAN

public static final Locale ITALIAN

JAPANESE

public static final Locale JAPANESE

KOREAN

public static final Locale KOREAN

CHINESE

public static final Locale CHINESE

SIMPLIFIED_CHINESE

public static final Locale SIMPLIFIED_CHINESE

TRADITIONAL_CHINESE

public static final Locale TRADITIONAL_CHINESE

FRANCE

public static final Locale FRANCE

GERMANY

public static final Locale GERMANY

ITALY

public static final Locale ITALY

JAPAN

public static final Locale JAPAN

KOREA

public static final Locale KOREA

CHINA

public static final Locale CHINA

PRC

public static final Locale PRC

TAIWAN

public static final Locale TAIWAN

UK

public static final Locale UK

US

public static final Locale US

CANADA

public static final Locale CANADA

CANADA_FRENCH

public static final Locale CANADA_FRENCH
Constructor Detail

Locale

public Locale(String,
              String,
              String)

Locale

public Locale(String,
              String)

Locale

public Locale(String)
Method Detail

getDefault

public static Locale getDefault()

setDefault

public static void setDefault(Locale)

getAvailableLocales

public static Locale[] getAvailableLocales()

getISOCountries

public static String[] getISOCountries()

getISOLanguages

public static String[] getISOLanguages()

getLanguage

public String getLanguage()

getCountry

public String getCountry()

getVariant

public String getVariant()

toString

public final String toString()
Overrides:
toString in class Object

getISO3Language

public String getISO3Language()
                       throws MissingResourceException

getISO3Country

public String getISO3Country()
                      throws MissingResourceException

getDisplayLanguage

public final String getDisplayLanguage()

getDisplayLanguage

public String getDisplayLanguage(Locale)

getDisplayCountry

public final String getDisplayCountry()

getDisplayCountry

public String getDisplayCountry(Locale)

getDisplayVariant

public final String getDisplayVariant()

getDisplayVariant

public String getDisplayVariant(Locale)

getDisplayName

public final String getDisplayName()

getDisplayName

public String getDisplayName(Locale)

clone

public Object clone()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object)
Description copied from class: Object
Determines if this object is "equal" to another object.

In general, objects should be instances of the same class with the same guts to be considered equal. For example, the code below only prints same value since s and t are different strings though they have the same value: "hello".

 String s = new String("hello");
 String t = new String("hello");
 if (s.equals(t)) System.out.println("same value");
 if (s == t) System.out.println("same string");

 

Overrides:
equals in class Object
Following copied from class: java.lang.Object
Parameters:
is - the other Object to which this one is compared
Returns:
true if this Object is equal to other