public static class PersonNameFormatter.Builder extends Object
Modifier and Type | Method and Description |
---|---|
PersonNameFormatter |
build()
Returns a new PersonNameFormatter with the values that were passed to this builder.
|
PersonNameFormatter.Builder |
setDisplayOrder(PersonNameFormatter.DisplayOrder order)
Specifies the desired display order for the formatted names.
|
PersonNameFormatter.Builder |
setFormality(PersonNameFormatter.Formality formality)
Sets the name formality for the formatter to be constructed.
|
PersonNameFormatter.Builder |
setLength(PersonNameFormatter.Length length)
Sets the name length for the formatter to be constructed.
|
PersonNameFormatter.Builder |
setLocale(Locale locale)
Sets the locale for the formatter to be constructed.
|
PersonNameFormatter.Builder |
setSurnameAllCaps(boolean allCaps)
Requests that the surname in the formatted result be rendered in ALL CAPS.
|
PersonNameFormatter.Builder |
setUsage(PersonNameFormatter.Usage usage)
Sets the name usage for the formatter to be constructed.
|
public PersonNameFormatter.Builder setLocale(Locale locale)
locale
- The new formatter locale. May not be null.public PersonNameFormatter.Builder setLength(PersonNameFormatter.Length length)
length
- The new name length.public PersonNameFormatter.Builder setUsage(PersonNameFormatter.Usage usage)
usage
- The new name length.public PersonNameFormatter.Builder setFormality(PersonNameFormatter.Formality formality)
formality
- The new name length.public PersonNameFormatter.Builder setDisplayOrder(PersonNameFormatter.DisplayOrder order)
order
- The desired display order for formatted names.public PersonNameFormatter.Builder setSurnameAllCaps(boolean allCaps)
allCaps
- If true, the surname in the formatted result will be rendered in ALL CAPS.public PersonNameFormatter build()
Copyright © 2016 Unicode, Inc. and others.