public enum LocaleLocalizer extends Enum<LocaleLocalizer> implements Localizer<Locale>
Enum Constant and Description |
---|
COUNTRY
Selects the
Locale.getDisplayCountry(java.util.Locale) method. |
LANGUAGE
Selects the
Locale.getDisplayLanguage(java.util.Locale) method. |
NAME
Selects the
Locale.getDisplayName(java.util.Locale) method. |
VARIANT
Selects the
Locale.getDisplayVariant(java.util.Locale) method. |
Modifier and Type | Method and Description |
---|---|
abstract String |
getDisplayString(Locale locale,
Locale inLocale)
Returns a string that is appropriate to display to the user.
|
static LocaleLocalizer |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static LocaleLocalizer[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final LocaleLocalizer NAME
Locale.getDisplayName(java.util.Locale)
method.public static final LocaleLocalizer LANGUAGE
Locale.getDisplayLanguage(java.util.Locale)
method.public static final LocaleLocalizer COUNTRY
Locale.getDisplayCountry(java.util.Locale)
method.public static final LocaleLocalizer VARIANT
Locale.getDisplayVariant(java.util.Locale)
method.public static LocaleLocalizer[] values()
for (LocaleLocalizer c : LocaleLocalizer.values()) System.out.println(c);
public static LocaleLocalizer valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract String getDisplayString(Locale locale, Locale inLocale)
getDisplayString
in interface Localizer<Locale>
locale
- the object to displayinLocale
- the string returned will be localized according to this value, if possibleCopyright © 2002–2017 SoftSmithy. All rights reserved.