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:
java.io.Serializable
,java.lang.Comparable<PersonNameFormatter.Formality>
- Enclosing class:
- PersonNameFormatter
public static enum PersonNameFormatter.Formality extends java.lang.Enum<PersonNameFormatter.Formality>
Specifies the intended formality of the formatted name.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Formality()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PersonNameFormatter.Formality
valueOf(java.lang.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.
-
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.
-
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.
-
-
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(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-