// Path: jrand-core/src/main/java/me/xdrop/jrand/Generator.java
// public abstract class Generator<T> {
// 
//     private Rand randGen;
// 
//     public Generator() {
//         this.randGen = new Rand();
//     }
// 
//     public Rand random() {
//         return this.randGen;
//     }
// 
//     public abstract T gen();
// 
//     public String repeat(int times) {
//         StringBuilder sb = new StringBuilder();
//         while (times-- > 0) {
//             sb.append(gen());
//         }
//         return sb.toString();
//     }
// 
//     public String genString() {
//         return gen().toString();
//     }
// 
//     public List<T> genMany(int num) {
//         List<T> many = new ArrayList<>();
//         for (int n = 0; n < num; n++) {
//             many.add(gen());
//         }
//         return many;
//     }
// 
//     public List<T> genManyUnique(int num) {
//         List<T> many = new LinkedList<>();
//         Set<T> present = new HashSet<>();
// 
// 
//         for (int n = 0; n < num; n++) {
//             T gen;
//             do {
//                 gen = gen();
//             } while (present.contains(gen));
//             many.add(gen);
//             present.add(gen);
//         }
// 
//         return many;
//     }
// 
//     public Set<T> genManyAsSet(int num) {
//         List<T> many = new LinkedList<>();
//         for (int n = 0; n < num; n++) {
//             many.add(gen());
//         }
//         return new HashSet<>(many);
//     }
// 
// }
// 
// Path: jrand-core/src/main/java/me/xdrop/jrand/generators/basics/BoolGenerator.java
// @Facade(accessor = "bool")
// public class BoolGenerator extends Generator<Boolean> {
// 
//     protected int likelihood;
// 
//     public BoolGenerator() {
//         this.likelihood = 50;
//     }
// 
//     /**
//      * Sets the likelihood of generating a true value
//      *
//      * @param likelihood The likelihood as int between 0 and 100
//      * @return The same generator
//      */
//     public BoolGenerator likelihood(int likelihood) {
//         this.likelihood = likelihood;
//         return this;
//     }
// 
//     @Override
//     public Boolean gen() {
//         float rand = random().randFloat();
//         return rand <= ((float) likelihood / 100);
//     }
// }
// 
// Path: jrand-core/src/main/java/me/xdrop/jrand/model/person/Gender.java
// public enum Gender {
//     MALE,
//     FEMALE,
//     NEUTRAL
// }


import me.xdrop.jrand.Generator;
import me.xdrop.jrand.annotation.Facade;
import me.xdrop.jrand.generators.basics.BoolGenerator;
import me.xdrop.jrand.model.person.Gender;
package me.xdrop.jrand.generators.person;


@Facade(accessor = "gender")
public class GenderGenerator extends Generator<String> {

    protected String male;
    protected String female;
    protected boolean full;
    protected BoolGenerator bool;

    public GenderGenerator() {
        this.bool = new BoolGenerator();
    }

    /**
     * Specify custom strings to be returned
     * @param male The male string to return
     * @param female The female string to return
     * @return The same generator
     */
    public GenderGenerator format(String male, String female) {
        this.male = male;
        this.female = female;
        return this;
    }

    /**
     * Return "Male" and "Female" instead of "M" and "F"
     * @return The same generator
     */
    public GenderGenerator full() {
        return full(true);
    }

    /**
     * Return "Male" and "Female" instead of "M" and "F"
     * @param enabled True for full,
     *                False for short
     * @return The same generator
     */
    public GenderGenerator full(boolean enabled) {
        this.full = enabled;
        return this;
    }

    /**
     * The likelihood to return male
     * @param likelihood An integer out of 100,
     *                   where 100 is 100% chance of
     *                   male.
     * @return The same generator
     */
    public GenderGenerator likelihood(int likelihood) {
        bool.likelihood(likelihood);
        return this;
    }

    /**
     * Generate as a {@link Gender} object
     * @return The gender object
     */
// Path: jrand-core/src/main/java/me/xdrop/jrand/Generator.java
// public abstract class Generator<T> {
// 
//     private Rand randGen;
// 
//     public Generator() {
//         this.randGen = new Rand();
//     }
// 
//     public Rand random() {
//         return this.randGen;
//     }
// 
//     public abstract T gen();
// 
//     public String repeat(int times) {
//         StringBuilder sb = new StringBuilder();
//         while (times-- > 0) {
//             sb.append(gen());
//         }
//         return sb.toString();
//     }
// 
//     public String genString() {
//         return gen().toString();
//     }
// 
//     public List<T> genMany(int num) {
//         List<T> many = new ArrayList<>();
//         for (int n = 0; n < num; n++) {
//             many.add(gen());
//         }
//         return many;
//     }
// 
//     public List<T> genManyUnique(int num) {
//         List<T> many = new LinkedList<>();
//         Set<T> present = new HashSet<>();
// 
// 
//         for (int n = 0; n < num; n++) {
//             T gen;
//             do {
//                 gen = gen();
//             } while (present.contains(gen));
//             many.add(gen);
//             present.add(gen);
//         }
// 
//         return many;
//     }
// 
//     public Set<T> genManyAsSet(int num) {
//         List<T> many = new LinkedList<>();
//         for (int n = 0; n < num; n++) {
//             many.add(gen());
//         }
//         return new HashSet<>(many);
//     }
// 
// }
// 
// Path: jrand-core/src/main/java/me/xdrop/jrand/generators/basics/BoolGenerator.java
// @Facade(accessor = "bool")
// public class BoolGenerator extends Generator<Boolean> {
// 
//     protected int likelihood;
// 
//     public BoolGenerator() {
//         this.likelihood = 50;
//     }
// 
//     /**
//      * Sets the likelihood of generating a true value
//      *
//      * @param likelihood The likelihood as int between 0 and 100
//      * @return The same generator
//      */
//     public BoolGenerator likelihood(int likelihood) {
//         this.likelihood = likelihood;
//         return this;
//     }
// 
//     @Override
//     public Boolean gen() {
//         float rand = random().randFloat();
//         return rand <= ((float) likelihood / 100);
//     }
// }
// 
// Path: jrand-core/src/main/java/me/xdrop/jrand/model/person/Gender.java
// public enum Gender {
//     MALE,
//     FEMALE,
//     NEUTRAL
// }


// Path: jrand-core/src/main/java/me/xdrop/jrand/generators/person/GenderGenerator.java
import me.xdrop.jrand.Generator;
import me.xdrop.jrand.annotation.Facade;
import me.xdrop.jrand.generators.basics.BoolGenerator;
import me.xdrop.jrand.model.person.Gender;

package me.xdrop.jrand.generators.person;


@Facade(accessor = "gender")
public class GenderGenerator extends Generator<String> {

    protected String male;
    protected String female;
    protected boolean full;
    protected BoolGenerator bool;

    public GenderGenerator() {
        this.bool = new BoolGenerator();
    }

    /**
     * Specify custom strings to be returned
     * @param male The male string to return
     * @param female The female string to return
     * @return The same generator
     */
    public GenderGenerator format(String male, String female) {
        this.male = male;
        this.female = female;
        return this;
    }

    /**
     * Return "Male" and "Female" instead of "M" and "F"
     * @return The same generator
     */
    public GenderGenerator full() {
        return full(true);
    }

    /**
     * Return "Male" and "Female" instead of "M" and "F"
     * @param enabled True for full,
     *                False for short
     * @return The same generator
     */
    public GenderGenerator full(boolean enabled) {
        this.full = enabled;
        return this;
    }

    /**
     * The likelihood to return male
     * @param likelihood An integer out of 100,
     *                   where 100 is 100% chance of
     *                   male.
     * @return The same generator
     */
    public GenderGenerator likelihood(int likelihood) {
        bool.likelihood(likelihood);
        return this;
    }

    /**
     * Generate as a {@link Gender} object
     * @return The gender object
     */
    public Gender genAsGender() {