public class PersonNameFormatter
extends java.lang.Object
REFERRING | ADDRESSING | MONOGRAM | ||||
---|---|---|---|---|---|---|
FORMAL | INFORMAL | FORMAL | INFORMAL | FORMAL | INFORMAL | |
LONG | James Earl Carter Jr. | Jimmy Carter | Mr. Carter | Jimmy | JEC | JC |
MEDIUM | James E. Carter Jr. | Jimmy Carter | Mr. Carter | Jimmy | C | J |
SHORT | J. E. Carter | Jimmy Carter | Mr. Carter | Jimmy | C | J |
Modifier and Type | Class and Description |
---|---|
static class |
PersonNameFormatter.Builder
A utility class that can be used to construct a PersonNameFormatter.
|
static class |
PersonNameFormatter.DisplayOrder
An enum indicating the desired display order for a formatted name.
|
static class |
PersonNameFormatter.Formality
Specifies the intended formality of the formatted name.
|
static class |
PersonNameFormatter.Length
Specifies the desired length of the formatted name.
|
static class |
PersonNameFormatter.Usage
Specifies the intended usage of the formatted name.
|
Constructor and Description |
---|
PersonNameFormatter(java.util.Locale locale,
java.lang.String[] patterns)
Deprecated.
This API is for unit testing only.
|
Modifier and Type | Method and Description |
---|---|
static PersonNameFormatter.Builder |
builder()
Returns a Builder object that can be used to construct a new PersonNameFormatter.
|
java.lang.String |
formatToString(PersonName name)
Formats a name.
|
PersonNameFormatter.Builder |
toBuilder()
Returns a Builder object whose fields match those used to construct this formatter,
allowing a new formatter to be created based on this one.
|
java.lang.String |
toString()
Deprecated.
This API is for debugging only.
|
@Deprecated public PersonNameFormatter(java.util.Locale locale, java.lang.String[] patterns)
public static PersonNameFormatter.Builder builder()
public PersonNameFormatter.Builder toBuilder()
public java.lang.String formatToString(PersonName name)
name
- A PersonName object that supplies individual field values (optionally, with modifiers applied)
to the formatter for formatting.public java.lang.String toString()
toString
in class java.lang.Object
Copyright ? 2016 Unicode, Inc. and others.