SimplePersonName
| Modifier and Type | Class and Description |
|---|---|
| public static enum | PersonName.FieldModifier
Identifiers for the name field modifiers supported by the PersonName and PersonNameFormatter objects. |
| public static enum | PersonName.NameField
Identifiers for the name fields supported by the PersonName object. |
| public static enum | PersonName.PreferredOrder
An enum to specify the preferred field order for the name. |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The value of the requested field, optionally modified by some or all of the requested modifiers, or null if the requested field isn't present in the name.The identifier of the requested field. identifier,An IN/OUT parameter that specifies modifiers to apply to the basic field value.
An implementing class can choose to handle or ignore any modifiers; it should modify
the passed-in Set so that on exit, it contains only the requested modifiers that it
DIDN'T handle. This parameter may not be null, and must either be mutable or empty. modifiersReturns one field of the name, possibly in a modified form. |
| public Locale | Returns: The name's locale, or null if it's not known.Returns the locale of the name-- that is, the language or country of origin for the person being named. |
| public PersonName. | Returns: The name's preferred field order.Returns the preferred field order for the name. |
| getFieldValue | back to summary |
|---|---|
| public String getFieldValue(PersonName. Returns one field of the name, possibly in a modified form.
| |
| getNameLocale | back to summary |
|---|---|
| public Locale getNameLocale() Returns the locale of the name-- that is, the language or country of origin for the person being named. An implementing class is allowed to return null here to indicate the name's locale is unknown. | |
| getPreferredOrder | back to summary |
|---|---|
| public PersonName. Returns the preferred field order for the name. PersonName objects should generally return DEFAULT, allowing the PersonNameFormatter to deduce the peoper field order based on the locales of the name and the formatter. But this can be used to force a particular field order, generally in cases where the deduction logic in PersonNameFormatter would guess wrong.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final PersonName. | ALL_CAPS
Requests the field value converted to ALL CAPS. |
| public static final PersonName. | CORE
If the field contains a main word with one or more separate prefixes, such as "van den Hul", this requests just the main word ("Hul"). |
| public static final PersonName. | GENITIVE
Requests the genitive form of the field's contents, if possible. |
| public static final PersonName. | INFORMAL
Requests an "informal" variant of the field, generally a nickname of some type: if "given" is "James", "given-informal" might be "Jimmy". |
| public static final PersonName. | INITIAL
Requests an initial for the specified field. |
| public static final PersonName. | INITIAL_CAP
Requests the field value with the first grapheme of each word converted to titlecase. |
| public static final PersonName. | MONOGRAM
Requests an initial for the specified field, suitable for use in a monogram (this usually differs from "initial" in that "initial" often adds a period and "monogram" never does). |
| private final String | name
Hides java. |
| public static final PersonName. | PREFIX
If the field contains a main word with one or more separate prefixes, such as "van den Hul", this requests just the prefixes ("van den"). |
| public static final PersonName. | RETAIN
When used in conjunction with "initial", preserves the punctuation between the initials as it existed in the original name field (e.g., "Jean-Claude" initializes into "J-C" instead of "J.C.") Has no effect if "initial" isn't also present in the list of modifiers. |
| public static final PersonName. | VOCATIVE
Requests the vocative form of the field's contents, if possible. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PersonName. | |
| public String | |
| public static PersonName. | |
| public static PersonName. |
| ALL_CAPS | back to summary |
|---|---|
| public static final PersonName. Requests the field value converted to ALL CAPS. PersonName objects generally won't need to handle this modifier themselves.
| |
| CORE | back to summary |
|---|---|
| public static final PersonName. If the field contains a main word with one or more separate prefixes, such as "van den Hul", this requests just the main word ("Hul"). Only applied to the "surname" field. If the implementing class doesn't apply this modifier, PersonNameFormatter assumes the entire "surname" field is the "core".
| |
| GENITIVE | back to summary |
|---|---|
| public static final PersonName. Requests the genitive form of the field's contents, if possible. The default implementation does nothing, but subclasses of PersonName can override getFieldValue() to produce the genitive form (or just add an "xxx-genitive" entry to a SimplePersonName).
| |
| INFORMAL | back to summary |
|---|---|
| public static final PersonName. Requests an "informal" variant of the field, generally a nickname of some type: if "given" is "James", "given-informal" might be "Jimmy". Only applied to the "given" field. If the PersonName object doesn't apply this modifier, PersonNameFormatter just uses the unmodified version of "given".
| |
| INITIAL | back to summary |
|---|---|
| public static final PersonName. Requests an initial for the specified field. PersonNameFormatter will do this algorithmically, but a PersonName object can apply this modifier itself if it wants different initial-generation logic (or stores the initial separately).
| |
| INITIAL_CAP | back to summary |
|---|---|
| public static final PersonName. Requests the field value with the first grapheme of each word converted to titlecase. A PersonName object might handle this modifier itself to capitalize words more selectively.
| |
| MONOGRAM | back to summary |
|---|---|
| public static final PersonName. Requests an initial for the specified field, suitable for use in a monogram (this usually differs from "initial" in that "initial" often adds a period and "monogram" never does). PersonNameFormatter will do this algorithmically, but a PersonName object can apply this modifier itself if it wants different monogram-generation logic.
| |
| name | back to summary |
|---|---|
| private final String name Hides java. | |
| PREFIX | back to summary |
|---|---|
| public static final PersonName. If the field contains a main word with one or more separate prefixes, such as "van den Hul", this requests just the prefixes ("van den"). Only applied to the "surname" field. If the PersonName object doesn't apply this modifier, PersonNameFormatter assumes there are no prefixes.
| |
| RETAIN | back to summary |
|---|---|
| public static final PersonName. Deprecated This API is ICU internal only. When used in conjunction with "initial", preserves the punctuation between the initials as it existed in the original name field (e.g., "Jean-Claude" initializes into "J-C" instead of "J.C.") Has no effect if "initial" isn't also present in the list of modifiers.
| |
| VOCATIVE | back to summary |
|---|---|
| public static final PersonName. Requests the vocative form of the field's contents, if possible. The default implementation does nothing, but subclasses of PersonName can override getFieldValue() to produce the vocative form (or just add an "xxx-vocative" entry to a SimplePersonName).
| |
| FieldModifier | back to summary |
|---|---|
| private FieldModifier(String name) | |
| forString | back to summary |
|---|---|
| public static PersonName. Returns the appropriate fieldModifier for its display name.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the FieldModifier's display name.
| |
| valueOf | back to summary |
|---|---|
| public static PersonName. | |
| values | back to summary |
|---|---|
| public static PersonName. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final PersonName. | CREDENTIALS
Professional qualifiers that in English generally follow the actual name, such as "M.D." or "J.D.". |
| public static final PersonName. | GENERATION
Generational qualifiers that in English generally follow the actual name, such as "Jr." or "III". |
| public static final PersonName. | GIVEN
The given name. |
| public static final PersonName. | GIVEN2
Additional given names. |
| private final String | name
Hides java. |
| public static final PersonName. | SURNAME
The surname. |
| public static final PersonName. | SURNAME2
Additional surnames. |
| public static final PersonName. | TITLE
Contains titles such as "Mr.", "Dr." (in English these typically precede the name) |
| Modifier and Type | Method and Description |
|---|---|
| public static PersonName. | |
| public String | |
| public static PersonName. | |
| public static PersonName. |
| CREDENTIALS | back to summary |
|---|---|
| public static final PersonName. Professional qualifiers that in English generally follow the actual name, such as "M.D." or "J.D.".
| |
| GENERATION | back to summary |
|---|---|
| public static final PersonName. Generational qualifiers that in English generally follow the actual name, such as "Jr." or "III".
| |
| GIVEN | back to summary |
|---|---|
| public static final PersonName. The given name. May contain more than one token.
| |
| GIVEN2 | back to summary |
|---|---|
| public static final PersonName. Additional given names. (In English, this is usually the "middle name" and may contain more than one word.)
| |
| name | back to summary |
|---|---|
| private final String name Hides java. | |
| SURNAME | back to summary |
|---|---|
| public static final PersonName. The surname. In Spanish, this is the patronymic surname.
| |
| SURNAME2 | back to summary |
|---|---|
| public static final PersonName. 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.)
| |
| TITLE | back to summary |
|---|---|
| public static final PersonName. Contains titles such as "Mr.", "Dr." (in English these typically precede the name)
| |
| NameField | back to summary |
|---|---|
| private NameField(String name) | |
| forString | back to summary |
|---|---|
| public static PersonName. Deprecated This API is for ICU internal use only. Returns the appropriate NameField for its display name.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns the NameField's display name.
| |
| valueOf | back to summary |
|---|---|
| public static PersonName. | |
| values | back to summary |
|---|---|
| public static PersonName. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final PersonName. | DEFAULT
Indicates the name has no preferred field order, and that the formatter should deduce the proper field order based on the locales of the name and the formatter. |
| public static final PersonName. | GIVEN_FIRST
Indicates that the name should be formatted in given-first order, even when the formatter would normally guess that it should be formatted in surname-first order. |
| public static final PersonName. | SURNAME_FIRST
Indicates that the name should be formatted in surname-first order, even when the formatter would normally guess that it should be formatted in given-first order. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static PersonName. | |
| public static PersonName. |
| DEFAULT | back to summary |
|---|---|
| public static final PersonName. Indicates the name has no preferred field order, and that the formatter should deduce the proper field order based on the locales of the name and the formatter.
| |
| GIVEN_FIRST | back to summary |
|---|---|
| public static final PersonName. Indicates that the name should be formatted in given-first order, even when the formatter would normally guess that it should be formatted in surname-first order.
| |
| SURNAME_FIRST | back to summary |
|---|---|
| public static final PersonName. Indicates that the name should be formatted in surname-first order, even when the formatter would normally guess that it should be formatted in given-first order.
| |
| PreferredOrder | back to summary |
|---|---|
| private PreferredOrder() | |
| valueOf | back to summary |
|---|---|
| public static PersonName. | |
| values | back to summary |
|---|---|
| public static PersonName. | |