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

com.github.javafaker.Superhero Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.0.2
Show newest version
package com.github.javafaker;

import com.github.javafaker.service.FakeValuesServiceInterface;

public class Superhero {
    private final Resolver resolver;
    private final FakeValuesServiceInterface fakeValueService;

    public Superhero(Resolver resolver,
                     FakeValuesServiceInterface fakeValueService) {
        this.resolver = resolver;
        this.fakeValueService = fakeValueService;
    }

    public String name() {
        return fakeValueService.resolve("superhero.name", this, resolver);
    }

    public String prefix() {
        return fakeValueService.fetchString("superhero.prefix");
    }

    public String suffix() {
        return fakeValueService.fetchString("superhero.suffix");
    }

    public String power() {
        return fakeValueService.fetchString("superhero.power");
    }

    public String descriptor() {
        return fakeValueService.fetchString("superhero.descriptor");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy