Class JsBigDecGen

java.lang.Object
jsonvalues.gen.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.

  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Random seed)
    Returns a supplier from the specified seed that generates a new JsBigDec each time it's called
    static fun.gen.Gen<JsBigDec>
    Returns a generator that produces values uniformly distributed
    static fun.gen.Gen<JsBigDec>
    Returns a generator that produces values uniformly distributed over a specified interval
    static fun.gen.Gen<JsBigDec>
    returns a biased generators that produces, with higher probability, potential problematic values that usually cause more bugs.
    static fun.gen.Gen<JsBigDec>
    biased(long min, long max)
    returns a biased generators that produces, with higher probability, potential problematic values that usually cause more bugs.
    static fun.gen.Gen<JsBigDec>
    returns a biased generators that produces, with higher probability, potential problematic values that usually cause more bugs.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.function.Function

    andThen, compose

    Methods inherited from interface fun.gen.Gen

    map, peek, sample, sample, sample, suchThat, suchThat, then