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:
java.io.Serializable
,java.lang.Comparable<PersonName.NameField>
- Enclosing interface:
- PersonName
public static enum PersonName.NameField extends java.lang.Enum<PersonName.NameField>
Identifiers for the name fields supported by the PersonName object.
-
-
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.", "Dr." (in English these typically precede the name)
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
name
-
Constructor Summary
Constructors Modifier Constructor Description private
NameField(java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PersonName.NameField
forString(java.lang.String name)
Deprecated.This API is for ICU internal use only.java.lang.String
toString()
Returns the NameField's display name.static PersonName.NameField
valueOf(java.lang.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)
-
GIVEN
public static final PersonName.NameField GIVEN
The given name. May contain more than one token.
-
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.)
-
SURNAME
public static final PersonName.NameField SURNAME
The surname. In Spanish, this is the patronymic surname.
-
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.)
-
GENERATION
public static final PersonName.NameField GENERATION
Generational qualifiers that in English generally follow the actual name, such as "Jr." or "III".
-
CREDENTIALS
public static final PersonName.NameField CREDENTIALS
Professional qualifiers that in English generally follow the actual name, such as "M.D." or "J.D.".
-
-
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(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
-
toString
public java.lang.String toString()
Returns the NameField's display name.- Overrides:
toString
in classjava.lang.Enum<PersonName.NameField>
-
forString
@Deprecated public static PersonName.NameField forString(java.lang.String name)
Deprecated.This API is for ICU internal use only.Returns the appropriate NameField for its display name.
-
-