com.github.javafaker.Demographic Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javafaker Show documentation
Show all versions of javafaker Show documentation
This library is a port of Ruby's stympy/faker gem (as well as Perl's Data::Faker library) that generates fake data.
It's useful when you're developing a new project and need some pretty data for showcase.
package com.github.javafaker;
public class Demographic {
private final Faker faker;
protected Demographic(Faker faker) {
this.faker = faker;
}
public String race() {
return faker.fakeValuesService().fetchString("demographic.race");
}
public String educationalAttainment() {
return faker.fakeValuesService().fetchString("demographic.educational_attainment");
}
public String demonym() {
return faker.fakeValuesService().fetchString("demographic.demonym");
}
public String sex() {
return faker.fakeValuesService().fetchString("demographic.sex");
}
public String maritalStatus() {
return faker.fakeValuesService().fetchString("demographic.marital_status");
}
}