Class Name


public class Name extends AbstractProvider<BaseProviders>
Since:
0.8.0
  • Field Summary

    Fields inherited from class net.datafaker.providers.base.AbstractProvider

    faker
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Internal constructor, not to be used by clients.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a random 'given' name such as Aaliyah, Aaron, Abagail or Abbey
    Returns the same value as name()
    Returns a random last name such as Smith, Jones or Baldwin
    A multipart name composed of an optional prefix, a firstname and a lastname or other possible variances based on locale.
    A multipart name composed of an optional prefix, a given and family name, another 'firstname' for the middle name and an optional suffix such as Jr.
    Returns a name prefix such as Mr., Mrs., Ms., Miss, or Dr.
    Returns a name suffix such as Jr., Sr., I, II, III, IV, V, MD, DDS, PhD or DVM
    A three part title composed of a descriptor level and job.
    A lowercase username composed of the first_name and last_name joined with a '.'.

    Methods inherited from class net.datafaker.providers.base.AbstractProvider

    equals, getFaker, hashCode, resolve, resolve

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • name

      public String name()
      A multipart name composed of an optional prefix, a firstname and a lastname or other possible variances based on locale. Examples:
      • James Jones Jr.
      • Julie Johnson
      Returns:
      a random name with given and family names and an optional suffix.
    • nameWithMiddle

      public String nameWithMiddle()
      A multipart name composed of an optional prefix, a given and family name, another 'firstname' for the middle name and an optional suffix such as Jr. Examples:
      • Mrs. Ella Geraldine Fitzgerald
      • Jason Tom Sawyer Jr.
      • Helen Jessica Troy
      Returns:
      a random name with a middle name component with optional prefix and suffix
    • fullName

      public String fullName()
      Returns the same value as name()
      See Also:
    • firstName

      public String firstName()
      Returns a random 'given' name such as Aaliyah, Aaron, Abagail or Abbey
      Returns:
      a 'given' name such as Aaliyah, Aaron, Abagail or Abbey
    • lastName

      public String lastName()
      Returns a random last name such as Smith, Jones or Baldwin
      Returns:
      a random last name such as Smith, Jones or Baldwin
    • prefix

      public String prefix()
      Returns a name prefix such as Mr., Mrs., Ms., Miss, or Dr.
      Returns:
      a name prefix such as Mr., Mrs., Ms., Miss, or Dr.
    • suffix

      public String suffix()
      Returns a name suffix such as Jr., Sr., I, II, III, IV, V, MD, DDS, PhD or DVM
      Returns:
      a name suffix such as Jr., Sr., I, II, III, IV, V, MD, DDS, PhD or DVM
    • title

      public String title()
      A three part title composed of a descriptor level and job. Some examples are :
      • (template) {descriptor} {level} {job}
      • Lead Solutions Specialist
      • National Marketing Manager
      • Central Response Liaison
      Returns:
      a random three part job title
    • username

      public String username()
      A lowercase username composed of the first_name and last_name joined with a '.'. Some examples are:
      Returns:
      a random two part user name.
      See Also: