416 |
* @return the string representation of this Locale |
* @return the string representation of this Locale |
417 |
* @see #getDisplayName() |
* @see #getDisplayName() |
418 |
*/ |
*/ |
419 |
public final String toString() |
public String toString() |
420 |
{ |
{ |
421 |
if (language.length() == 0 && country.length() == 0) |
if (language.length() == 0 && country.length() == 0) |
422 |
return ""; |
return ""; |
522 |
* @return the language name of this locale localized to the default locale, |
* @return the language name of this locale localized to the default locale, |
523 |
* with the ISO code as backup |
* with the ISO code as backup |
524 |
*/ |
*/ |
525 |
public final String getDisplayLanguage() |
public String getDisplayLanguage() |
526 |
{ |
{ |
527 |
return getDisplayLanguage(defaultLocale); |
return getDisplayLanguage(defaultLocale); |
528 |
} |
} |
560 |
* @return the country name of this locale localized to the given locale, |
* @return the country name of this locale localized to the given locale, |
561 |
* with the ISO code as backup |
* with the ISO code as backup |
562 |
*/ |
*/ |
563 |
public final String getDisplayCountry() |
public String getDisplayCountry() |
564 |
{ |
{ |
565 |
return getDisplayCountry(defaultLocale); |
return getDisplayCountry(defaultLocale); |
566 |
} |
} |
598 |
* @return the variant code of this locale localized to the given locale, |
* @return the variant code of this locale localized to the given locale, |
599 |
* with the ISO code as backup |
* with the ISO code as backup |
600 |
*/ |
*/ |
601 |
public final String getDisplayVariant() |
public String getDisplayVariant() |
602 |
{ |
{ |
603 |
return getDisplayVariant(defaultLocale); |
return getDisplayVariant(defaultLocale); |
604 |
} |
} |
637 |
* |
* |
638 |
* @return String version of this locale, suitable for display to the user |
* @return String version of this locale, suitable for display to the user |
639 |
*/ |
*/ |
640 |
public final String getDisplayName() |
public String getDisplayName() |
641 |
{ |
{ |
642 |
return getDisplayName(defaultLocale); |
return getDisplayName(defaultLocale); |
643 |
} |
} |