public class LocaleNameFormatter extends Object
| Constructor and Description |
|---|
LocaleNameFormatter()
Creates a new formatter with the locale information from
DefaultLocaleAttributesUtil. |
LocaleNameFormatter(Iterable<? extends LocaleInfo> localeInfos)
Deprecated.
Use
LocaleNameFormatter(LocaleAttributesUtil) instead |
LocaleNameFormatter(LocaleAttributesUtil localeConfig)
Creates a new formatter with the given locale information.
|
| Modifier and Type | Method and Description |
|---|---|
String |
format(Locale locale,
String firstName,
String lastName)
Performs locale-sensitive formatting of a name using all fields (if they apply in the locale).
|
String |
format(Locale locale,
String salutation,
String firstName,
String lastName)
Performs locale-sensitive formatting of a name using all fields (if they apply in the locale).
|
String |
format(Locale locale,
String salutation,
String firstName,
String lastName,
boolean casual)
Performs locale-sensitive formatting of a name using all fields (if they apply in the locale).
|
String |
format(Locale locale,
String salutation,
String firstName,
String lastName,
String middleName,
String informalName,
String suffix)
Performs locale-sensitive formatting of a name using all fields (if they apply in the locale).
|
String |
format(Locale locale,
String salutation,
String firstName,
String lastName,
String middleName,
String informalName,
String suffix,
boolean casual)
Performs locale-sensitive formatting of a name using all fields (if they apply in the locale).
|
boolean |
isFormalLocale(Locale locale)
Deprecated.
Use
LocaleAttributesUtil.isFormalLocale(Locale) instead |
boolean |
useEasternNameOrder(Locale locale)
Deprecated.
Use
LocaleAttributesUtil.useEasternNameOrder(Locale) instead |
public LocaleNameFormatter()
DefaultLocaleAttributesUtil.public LocaleNameFormatter(LocaleAttributesUtil localeConfig)
localeConfig - the extra information associated to a locale@Deprecated public LocaleNameFormatter(Iterable<? extends LocaleInfo> localeInfos)
LocaleNameFormatter(LocaleAttributesUtil) insteadlocaleInfos - the collection of extra information associated to a locale@Deprecated public boolean isFormalLocale(Locale locale)
LocaleAttributesUtil.isFormalLocale(Locale) instead@Deprecated public boolean useEasternNameOrder(Locale locale)
LocaleAttributesUtil.useEasternNameOrder(Locale) insteadpublic String format(Locale locale, String firstName, String lastName)
Might return a String with a trailing space -- deal with it.
locale - the locale that the name is displayed infirstName - the first name of the personlastName - the last name of the personpublic String format(Locale locale, String salutation, String firstName, String lastName)
Might return a String with a trailing space -- deal with it.
locale - the locale that the name is displayed insalutation - the salutation of the person or null if not specifiedfirstName - the first name of the personlastName - the last name of the personpublic String format(Locale locale, String salutation, String firstName, String lastName, boolean casual)
Might return a String with a trailing space -- deal with it.
locale - the locale that the name is displayed insalutation - the salutation of the person or null if not specifiedfirstName - the first name of the personlastName - the last name of the personcasual - if true, use first name only, if the locale allows itpublic String format(Locale locale, String salutation, String firstName, String lastName, String middleName, String informalName, String suffix)
Might return a String with a trailing space -- deal with it.
locale - the locale that the name is displayed insalutation - the salutation of the person or null if not specifiedfirstName - the first name of the personlastName - the last name of the personmiddleName - the middle name of the person or null if not specifiedinformalName - the informal name of the person or null if not specifiedsuffix - the suffix or null if not specifiedpublic String format(Locale locale, String salutation, String firstName, String lastName, String middleName, String informalName, String suffix, boolean casual)
Might return a String with a trailing space -- deal with it.
locale - the locale that the name is displayed insalutation - the salutation of the person or null if not specifiedfirstName - the first name of the personlastName - the last name of the personmiddleName - the middle name of the person or null if not specifiedinformalName - the informal name of the person or null if not specifiedsuffix - the suffix or null if not specifiedcasual - if true, use first name only, if the locale allows itCopyright (c) 2016-2017, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE.txt file in the repository.