public class Name extends Object
Modifier | Constructor and Description |
---|---|
protected |
Name(Faker faker)
Internal constructor, not to be used by clients.
|
Modifier and Type | Method and Description |
---|---|
String |
firstName()
Returns a random 'given' name such as Aaliyah, Aaron, Abagail or Abbey
|
String |
fullName()
Returns the same value as
name() |
String |
lastName()
Returns a random last name such as Smith, Jones or Baldwin
|
String |
name()
A multipart name composed of an optional prefix, a firstname and a lastname
or other possible variances based on locale.
|
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.
|
String |
prefix()
Returns a name prefix such as Mr., Mrs., Ms., Miss, or Dr.
|
String |
suffix()
Returns a name suffix such as Jr., Sr., I, II, III, IV, V, MD, DDS, PhD or DVM
|
String |
title()
A three part title composed of a descriptor level and job.
|
String |
username()
A lowercase username composed of the first_name and last_name joined with a '.'.
|
protected Name(Faker faker)
Name
should be accessed via
Faker.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:
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:
public String firstName()
Returns a random 'given' name such as Aaliyah, Aaron, Abagail or Abbey
public String lastName()
Returns a random last name such as Smith, Jones or Baldwin
public String prefix()
Returns a name prefix such as Mr., Mrs., Ms., Miss, or Dr.
public String suffix()
Returns a name suffix such as Jr., Sr., I, II, III, IV, V, MD, DDS, PhD or DVM
public String title()
A three part title composed of a descriptor level and job. Some examples are :
public String username()
A lowercase username composed of the first_name and last_name joined with a '.'. Some examples are:
firstName()
.lastName()
firstName()
,
lastName()
Copyright © 2019. All rights reserved.