All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.datafaker.providers.base.Computer Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 2.4.2
Show newest version
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