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

net.datafaker.providers.base.Animal 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;

import net.datafaker.internal.helper.WordUtils;

/**
 * @since 0.8.0
 */
public class Animal extends AbstractProvider {

    protected Animal(BaseProviders faker) {
        super(faker);
    }

    public String name() {
        return resolve("creature.animal.name");
    }

    public String scientificName() {
        return genus() + " " + species();
    }

    public String genus() {
        return WordUtils.capitalize(faker.resolve("creature.animal.genus"));
    }

    public String species() {
        return resolve("creature.animal.species").toLowerCase();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy