Enum PersonName.NameField

java.lang.Object
java.lang.Enum<PersonName.NameField>
com.ibm.icu.text.PersonName.NameField
All Implemented Interfaces:
Serializable, Comparable<PersonName.NameField>, java.lang.constant.Constable
Enclosing interface:
PersonName

public static enum PersonName.NameField extends Enum<PersonName.NameField>
Identifiers for the name fields supported by the PersonName object.
  • Enum Constant Details

    • 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 Details

    • values

      public static PersonName.NameField[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      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 name
      NullPointerException - if the argument is null
    • toString

      public String toString()
      Returns the NameField's display name.
      Overrides:
      toString in class Enum<PersonName.NameField>
    • 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.