public class Name extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Name.Serializer
For internal use only.
|
Modifier and Type | Field and Description |
---|---|
protected String |
displayName |
protected String |
familiarName |
protected String |
givenName |
protected String |
surname |
Constructor and Description |
---|
Name(String givenName,
String surname,
String familiarName,
String displayName)
Representations for a person's name to assist with internationalization.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getDisplayName()
A name that can be used directly to represent the name of a user's
Dropbox account.
|
String |
getFamiliarName()
Locale-dependent name.
|
String |
getGivenName()
Also known as a first name.
|
String |
getSurname()
Also known as a last name or family name.
|
int |
hashCode() |
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final String givenName
protected final String surname
protected final String familiarName
protected final String displayName
public Name(String givenName, String surname, String familiarName, String displayName)
givenName
- Also known as a first name. Must not be null
.surname
- Also known as a last name or family name. Must not be
null
.familiarName
- Locale-dependent name. In the US, a person's
familiar name is their getGivenName()
, but elsewhere, it
could be any combination of a person's getGivenName()
and
getSurname()
. Must not be null
.displayName
- A name that can be used directly to represent the
name of a user's Dropbox account. Must not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String getGivenName()
null
.public String getSurname()
null
.public String getFamiliarName()
getGivenName()
, but elsewhere, it could be any combination of
a person's getGivenName()
and getSurname()
.null
.public String getDisplayName()
null
.public String toStringMultiline()
The returned String may contain newlines.