
net.datafaker.providers.base.Computer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datafaker Show documentation
Show all versions of datafaker Show documentation
This library is a improved port of JavaFaker (as well as Ruby's stympy/faker gem and 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 net.datafaker.providers.base;
/**
* Generates different attributes related to computers, such as operating systems, types, platforms and brands.
*
* @since 1.5.0
*/
public class Computer extends AbstractProvider {
protected Computer(BaseProviders faker) {
super(faker);
}
public String type() {
return resolve("computer.type");
}
public String platform() {
return resolve("computer.platform");
}
public String operatingSystem() {
return resolve("computer.os." + faker.options().option("linux", "macos", "windows"));
}
public String linux() {
return resolve("computer.os.linux");
}
public String macos() {
return resolve("computer.os.macos");
}
public String windows() {
return resolve("computer.os.windows");
}
public String brand() { return resolve("computer.brand"); }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy