Class Name

java.lang.Object
com.dropbox.core.v2.users.Name

public class Name extends Object
Representations for a person's name to assist with internationalization.
  • Field Details

    • givenName

      @Nonnull protected final String givenName
    • surname

      @Nonnull protected final String surname
    • familiarName

      @Nonnull protected final String familiarName
    • displayName

      @Nonnull protected final String displayName
    • abbreviatedName

      @Nonnull protected final String abbreviatedName
  • Constructor Details

    • Name

      public Name(@Nonnull String givenName, @Nonnull String surname, @Nonnull String familiarName, @Nonnull String displayName, @Nonnull String abbreviatedName)
      Representations for a person's name to assist with internationalization.
      Parameters:
      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.
      abbreviatedName - An abbreviated form of the person's name. Their initials in most locales. Must not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getGivenName

      @Nonnull public String getGivenName()
      Also known as a first name.
      Returns:
      value for this field, never null.
    • getSurname

      @Nonnull public String getSurname()
      Also known as a last name or family name.
      Returns:
      value for this field, never null.
    • getFamiliarName

      @Nonnull public String getFamiliarName()
      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().
      Returns:
      value for this field, never null.
    • getDisplayName

      @Nonnull public 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 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 class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringMultiline

      public 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