public class Faker extends Object
| Constructor and Description |
|---|
Faker() |
Faker(Locale locale) |
Faker(Locale locale,
Random random) |
Faker(Random random) |
| Modifier and Type | Method and Description |
|---|---|
Address |
address() |
App |
app() |
Beer |
beer() |
Book |
book() |
Bool |
bool() |
String |
bothify(String string)
Applies both a
numerify(String) and a letterify(String)
over the incoming string. |
String |
bothify(String string,
boolean isUpper)
Applies both a
numerify(String) and a letterify(String)
over the incoming string. |
Business |
business() |
Cat |
cat() |
ChuckNorris |
chuckNorris() |
Code |
code() |
Color |
color() |
Commerce |
commerce() |
Company |
company() |
Crypto |
crypto() |
DateAndTime |
date() |
Educator |
educator() |
String |
expression(String expression)
Allows the evaluation of native YML expressions to allow you to build your own.
|
File |
file() |
Finance |
finance() |
Food |
food() |
GameOfThrones |
gameOfThrones() |
Hacker |
hacker() |
IdNumber |
idNumber() |
Internet |
internet() |
String |
letterify(String letterString)
Returns a string with the '?' characters in the parameter replaced with random alphabetic
characters.
|
String |
letterify(String letterString,
boolean isUpper)
Returns a string with the '?' characters in the parameter replaced with random alphabetic
characters.
|
Lorem |
lorem() |
Music |
music() |
Name |
name() |
Number |
number() |
String |
numerify(String numberString)
Returns a string with the '#' characters in the parameter replaced with random digits between 0-9 inclusive.
|
Options |
options() |
PhoneNumber |
phoneNumber() |
Pokemon |
pokemon() |
String |
regexify(String regex)
Generates a String that matches the given regular expression.
|
String |
resolve(String key) |
Shakespeare |
shakespeare() |
SlackEmoji |
slackEmoji() |
Space |
space() |
Superhero |
superhero() |
Team |
team() |
University |
university() |
public Faker()
public Faker(Locale locale)
public Faker(Random random)
public String numerify(String numberString)
For example, the string "ABC##EFG" could be replaced with a string like "ABC99EFG".
numberString - public String letterify(String letterString)
For example, the string "12??34" could be replaced with a string like "12AB34".
letterString - public String letterify(String letterString, boolean isUpper)
For example, the string "12??34" could be replaced with a string like "12AB34".
letterString - isUpper - public String bothify(String string)
numerify(String) and a letterify(String)
over the incoming string.string - public String bothify(String string, boolean isUpper)
numerify(String) and a letterify(String)
over the incoming string.string - isUpper - public String regexify(String regex)
public App app()
public Music music()
public Name name()
public Number number()
public Internet internet()
public PhoneNumber phoneNumber()
public Pokemon pokemon()
public Lorem lorem()
public Address address()
public Book book()
public Business business()
public ChuckNorris chuckNorris()
public Color color()
public Commerce commerce()
public Company company()
public Crypto crypto()
public Hacker hacker()
public IdNumber idNumber()
public Options options()
public Code code()
public File file()
public Finance finance()
public Food food()
public GameOfThrones gameOfThrones()
public DateAndTime date()
public Educator educator()
public SlackEmoji slackEmoji()
public Shakespeare shakespeare()
public Space space()
public Superhero superhero()
public Bool bool()
public Team team()
public Beer beer()
public University university()
public Cat cat()
public String expression(String expression)
expression - (see examples above)RuntimeException - if unable to evaluate the expressionCopyright © 2016. All Rights Reserved.