Package com.ibm.icu.text
Enum PersonName.NameField
- java.lang.Object
-
- java.lang.Enum<PersonName.NameField>
-
- com.ibm.icu.text.PersonName.NameField
-
- All Implemented Interfaces:
Serializable
,Comparable<PersonName.NameField>
- Enclosing interface:
- PersonName
public static enum PersonName.NameField extends Enum<PersonName.NameField>
Identifiers for the name fields supported by the PersonName object.- Status:
- Stable ICU 73.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CREDENTIALS
Professional qualifiers that in English generally follow the actual name, such as "M.D." or "J.D.".GENERATION
Generational qualifiers that in English generally follow the actual name, such as "Jr." or "III".GIVEN
The given name.GIVEN2
Additional given names.SURNAME
The surname.SURNAME2
Additional surnames.TITLE
Contains titles such as "Mr
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PersonName.NameField
forString(String name)
Deprecated.This API is for ICU internal use only.String
toString()
Returns the NameField's display name.static PersonName.NameField
valueOf(String name)
Returns the enum constant of this type with the specified name.static PersonName.NameField[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
TITLE
public static final PersonName.NameField TITLE
Contains titles such as "Mr.", "Dr." (in English these typically precede the name)- Status:
- Stable ICU 73.
-
GIVEN
public static final PersonName.NameField GIVEN
The given name. May contain more than one token.- Status:
- Stable ICU 73.
-
GIVEN2
public static final PersonName.NameField GIVEN2
Additional given names. (In English, this is usually the "middle name" and may contain more than one word.)- Status:
- Stable ICU 73.
-
SURNAME
public static final PersonName.NameField SURNAME
The surname. In Spanish, this is the patronymic surname.- Status:
- Stable ICU 73.
-
SURNAME2
public static final PersonName.NameField SURNAME2
Additional surnames. This is only used in a few languages, such as Spanish, where it is the matronymic surname. (In most languages, multiple surnames all just go in the SURNAME field.)- Status:
- Stable ICU 73.
-
GENERATION
public static final PersonName.NameField GENERATION
Generational qualifiers that in English generally follow the actual name, such as "Jr." or "III".- Status:
- Stable ICU 73.
-
CREDENTIALS
public static final PersonName.NameField CREDENTIALS
Professional qualifiers that in English generally follow the actual name, such as "M.D." or "J.D.".- Status:
- Stable ICU 73.
-
-
Method Detail
-
values
public static PersonName.NameField[] 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 (PersonName.NameField c : PersonName.NameField.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PersonName.NameField 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
-
toString
public String toString()
Returns the NameField's display name.- Overrides:
toString
in classEnum<PersonName.NameField>
- Status:
- Stable ICU 73.
-
forString
@Deprecated public static PersonName.NameField forString(String name)
Deprecated.This API is for ICU internal use only.Returns the appropriate NameField for its display name.- Status:
- Internal. This API is ICU internal only.
-
-