package me.xdrop.jrand.generators.time;

import me.xdrop.jrand.Generator;
import me.xdrop.jrand.annotation.Facade;
import me.xdrop.jrand.annotation.PropertyFlag;
import me.xdrop.jrand.generators.basics.NaturalGenerator;

@Facade(accessor = "hour")
public class HourGenerator extends Generator<String> {

    private NaturalGenerator nat;

    @PropertyFlag("Enable to return an hour between 1 and 24")
    private boolean twentyfour;

    public HourGenerator() {
        this.nat = new NaturalGenerator();
        this.nat.min(1).max(12);
    }

    @Override
    public String gen() {
        return null;
    }


}

@@ -540,16 +540,189 @@
 %0A    %7D%0A%0A
+%0A    public int genInt() %7B%0A        if (twentyfour) %7B%0A            nat.range(1, 24);%0A        %7D else %7B%0A            nat.range(1, 12);%0A        %7D%0A        return nat.gen();%0A    %7D%0A%0A
     @Ove
@@ -772,12 +772,21 @@
 urn 
-null
+genInt() + %22%22
 ;%0A  

Add hour generator genInt