Package com.dropbox.core.v2.users
Class Name
- java.lang.Object
-
- com.dropbox.core.v2.users.Name
-
public class Name extends java.lang.Object
Representations for a person's name to assist with internationalization.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Name.Serializer
For internal use only.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
abbreviatedName
protected java.lang.String
displayName
protected java.lang.String
familiarName
protected java.lang.String
givenName
protected java.lang.String
surname
-
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 boolean
equals(java.lang.Object obj)
java.lang.String
getAbbreviatedName()
An abbreviated form of the person's name.java.lang.String
getDisplayName()
A name that can be used directly to represent the name of a user's Dropbox account.java.lang.String
getFamiliarName()
Locale-dependent name.java.lang.String
getGivenName()
Also known as a first name.java.lang.String
getSurname()
Also known as a last name or family name.int
hashCode()
java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
givenName
@Nonnull protected final java.lang.String givenName
-
surname
@Nonnull protected final java.lang.String surname
-
familiarName
@Nonnull protected final java.lang.String familiarName
-
displayName
@Nonnull protected final java.lang.String displayName
-
abbreviatedName
@Nonnull protected final java.lang.String abbreviatedName
-
-
Constructor Detail
-
Name
public Name(@Nonnull java.lang.String givenName, @Nonnull java.lang.String surname, @Nonnull java.lang.String familiarName, @Nonnull java.lang.String displayName, @Nonnull 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
@Nonnull public java.lang.String getGivenName()
Also known as a first name.- Returns:
- value for this field, never
null
.
-
getSurname
@Nonnull public java.lang.String getSurname()
Also known as a last name or family name.- Returns:
- value for this field, never
null
.
-
getFamiliarName
@Nonnull 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
@Nonnull 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
@Nonnull 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:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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
-
-