Package com.dropbox.core.v2.users
Class Name
- java.lang.Object
-
- com.dropbox.core.v2.users.Name
-
public class Name extends java.lang.ObjectRepresentations for a person's name to assist with internationalization.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static className.SerializerFor internal use only.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringabbreviatedNameprotected java.lang.StringdisplayNameprotected java.lang.StringfamiliarNameprotected java.lang.StringgivenNameprotected java.lang.Stringsurname
-
Constructor Summary
Constructors Constructor Description Name(java.lang.String givenName, java.lang.String surname, java.lang.String familiarName, java.lang.String displayName, java.lang.String abbreviatedName)Representations for a person's name to assist with internationalization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetAbbreviatedName()An abbreviated form of the person's name.java.lang.StringgetDisplayName()A name that can be used directly to represent the name of a user's Dropbox account.java.lang.StringgetFamiliarName()Locale-dependent name.java.lang.StringgetGivenName()Also known as a first name.java.lang.StringgetSurname()Also known as a last name or family name.inthashCode()java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
-
-
-
Constructor Detail
-
Name
public Name(java.lang.String givenName, java.lang.String surname, java.lang.String familiarName, java.lang.String displayName, java.lang.String abbreviatedName)Representations for a person's name to assist with internationalization.- Parameters:
givenName- Also known as a first name. Must not benull.surname- Also known as a last name or family name. Must not benull.familiarName- Locale-dependent name. In the US, a person's familiar name is theirgetGivenName(), but elsewhere, it could be any combination of a person'sgetGivenName()andgetSurname(). Must not benull.displayName- A name that can be used directly to represent the name of a user's Dropbox account. Must not benull.abbreviatedName- An abbreviated form of the person's name. Their initials in most locales. Must not benull.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
-
Method Detail
-
getGivenName
public java.lang.String getGivenName()
Also known as a first name.- Returns:
- value for this field, never
null.
-
getSurname
public java.lang.String getSurname()
Also known as a last name or family name.- Returns:
- value for this field, never
null.
-
getFamiliarName
public java.lang.String getFamiliarName()
Locale-dependent name. In the US, a person's familiar name is theirgetGivenName(), but elsewhere, it could be any combination of a person'sgetGivenName()andgetSurname().- Returns:
- value for this field, never
null.
-
getDisplayName
public java.lang.String getDisplayName()
A name that can be used directly to represent the name of a user's Dropbox account.- Returns:
- value for this field, never
null.
-
getAbbreviatedName
public java.lang.String getAbbreviatedName()
An abbreviated form of the person's name. Their initials in most locales.- Returns:
- value for this field, never
null.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringMultiline
public java.lang.String toStringMultiline()
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Returns:
- Formatted, multiline String representation of this object
-
-