language = convertLanguage(language);
country = country.toUpperCase();
}
- this.language = language.intern();
- this.country = country.intern();
- this.variant = variant.intern();
+ this.language = language;//.intern();
+ this.country = country;//.intern();
+ this.variant = variant;//.intern();
hashcode = language.hashCode() ^ country.hashCode() ^ variant.hashCode();
}
public static void setDefault(Locale newLocale)
{
if (newLocale == null)
- throw new NullPointerException();
+ throw new Exception/*NullPointerException*/("NullPointerException");
/*SecurityManager sm = System.getSecurityManager();
if (sm != null)
sm.checkPermission(new PropertyPermission("user.language", "write"));*/
*
* @return the installed locales
*/
- public static synchronized Locale[] getAvailableLocales()
+ /*public static synchronized Locale[] getAvailableLocales()
{
if (availableLocales == null)
{
}
return (Locale[]) availableLocales.clone();
- }
+ }*/
/**
* Returns a list of all 2-letter uppercase country codes as defined
*
* @return a list of acceptable country codes
*/
- public static String[] getISOCountries()
+ /*public static String[] getISOCountries()
{
if (countryCache == null)
{
}
return (String[]) countryCache.clone();
- }
+ }*/
/**
* Returns a list of all 2-letter lowercase language codes as defined
*
* @return a list of acceptable language codes
*/
- public static String[] getISOLanguages()
+ /*public static String[] getISOLanguages()
{
if (languageCache == null)
{
languageCache = getISOStrings("languages");
}
return (String[]) languageCache.clone();
- }
+ }*/
/**
* Returns the set of keys from the specified resource hashtable, filtered
*
* @throws MissingResourceException if the three-letter code is not known
*/
- public String getISO3Language()
+ /*public String getISO3Language()
{
// We know all strings are interned so we can use '==' for better performance.
if (language == "")
+ "srpsswsotsunsweswatamteltgkthatirtuktgltsntonturtsotattwiuigukrurd"
+ "uzbvievolwolxhoyidyorzhazhozul")
.substring(index, index + 3);
- }
+ }*/
/**
* Returns the three-letter ISO country abbrevation of the locale.
*
* @throws MissingResourceException if the three-letter code is not known
*/
- public String getISO3Country()
+ /*public String getISO3Country()
{
// We know all strings are interned so we can use '==' for better performance.
if (country == "")
+ "SLVSYRSWZTCATCDATFTGOTHATJKTKLTKMTUNTONTMPTURTTOTUVTWNTZAUKRUGAUMI"
+ "USAURYUZBVATVCTVENVGBVIRVNMVUTWLFWSMYEMMYTYUGZAFZMBZARZWE")
.substring(index, index + 3);
- }
+ }*/
/**
* Gets the country name suitable for display to the user, formatted
* @return the language name of this locale localized to the default locale,
* with the ISO code as backup
*/
- public String getDisplayLanguage()
+ /*public String getDisplayLanguage()
{
return getDisplayLanguage(defaultLocale);
- }
+ }*/
/**
* <p>
* @return the country name of this locale localized to the given locale,
* with the ISO code as backup
*/
- public String getDisplayCountry()
+ /*public String getDisplayCountry()
{
- return null;//getDisplayCountry(defaultLocale);
- }
+ return getDisplayCountry(defaultLocale);
+ }*/
/**
* <p>
* @return the variant code of this locale localized to the given locale,
* with the ISO code as backup
*/
- public String getDisplayVariant()
+ /*public String getDisplayVariant()
{
return getDisplayVariant(defaultLocale);
- }
+ }*/
/**
*
* @return String version of this locale, suitable for display to the user
*/
- public String getDisplayName()
+ /*public String getDisplayName()
{
return getDisplayName(defaultLocale);
- }
+ }*/
/**
* Gets all local components suitable for display to the user, formatted
return false;
Locale l = (Locale) obj;
- return (language == l.language
- && country == l.country
- && variant == l.variant);
+ return (language.equals(l.language)// == l.language
+ && country.equals(l.country)// == l.country
+ && variant.equals(l.variant)/* == l.variant*/);
}
/**