Class JsBigDecGen

  • All Implemented Interfaces:
    fun.gen.Gen<JsBigDec>, Function<Random,​Supplier<JsBigDec>>

    public final class JsBigDecGen
    extends Object
    implements fun.gen.Gen<JsBigDec>
    Represents a JsBigDec generator. It can be created using the static factory methods biased and arbitrary or, if none of the previous suit your needs, from a decimal generator and the function map:
    
         import fun.gen.Gen;
         import jsonvalues.JsBigDec;
    
         Gen<BigDecimal> decGen = seed -> () -> {...};
         Gen<JsBigDec> jsDecGen = gen.map(JsBigDec::of)
         
     

    Arbitrary generators produces uniformed distributions of values. Biased generators produces, with higher probability, potential problematic values that usually cause more bugs.