Package com.ibm.icu.text
Enum PersonNameFormatter.Formality
- java.lang.Object
-
- java.lang.Enum<PersonNameFormatter.Formality>
-
- com.ibm.icu.text.PersonNameFormatter.Formality
-
- All Implemented Interfaces:
Serializable
,Comparable<PersonNameFormatter.Formality>
- Enclosing class:
- PersonNameFormatter
public static enum PersonNameFormatter.Formality extends Enum<PersonNameFormatter.Formality>
Specifies the intended formality of the formatted name.- Status:
- Stable ICU 73.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PersonNameFormatter.Formality
valueOf(String name)
Returns the enum constant of this type with the specified name.static PersonNameFormatter.Formality[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FORMAL
public static final PersonNameFormatter.Formality FORMAL
The more formal version of the name.- Status:
- Stable ICU 73.
-
INFORMAL
public static final PersonNameFormatter.Formality INFORMAL
The more informal version of the name. In English, this might omit fields or use the "informal" variant of the given name.- Status:
- Stable ICU 73.
-
DEFAULT
public static final PersonNameFormatter.Formality DEFAULT
The default formality for the locale. For most locales, this is the same as FORMAL, but for English, this is the same as INFORMAL.- Status:
- Stable ICU 74.
-
-
Method Detail
-
values
public static PersonNameFormatter.Formality[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PersonNameFormatter.Formality c : PersonNameFormatter.Formality.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PersonNameFormatter.Formality valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-