Module json_values

Class JsLongGen

java.lang.Object
jsonvalues.gen.JsLongGen
All Implemented Interfaces:
fun.gen.Gen<JsLong>, Function<Random,Supplier<JsLong>>

public final class JsLongGen extends Object implements fun.gen.Gen<JsLong>
Represents a JsLong generator. It can be created using the static factory methods biased() and arbitrary() or, if none of the previous suit your needs, from a long generator and the function map:

 import fun.gen.Gen;
 import jsonvalues.JsLong;

 Gen<Long> longGen = seed -> () -> {...};
 Gen<JsLong> jsLongGen = gen.map(JsLong::of);
 
Arbitrary generators produce values with a uniform distribution. Biased generators produce potential problematic values with a higher probability, which can help identify and test edge cases.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Random seed)
     
    static fun.gen.Gen<JsLong>
    Returns a generator that produces values with a uniform distribution.
    static fun.gen.Gen<JsLong>
    arbitrary(long min, long max)
    Returns a generator that produces values uniformly distributed over a specified interval.
    static fun.gen.Gen<JsLong>
    Returns a biased generator that produces potential problematic values with a higher probability.
    static fun.gen.Gen<JsLong>
    biased(long min, long max)
    Returns a biased generator that produces potential problematic values with a higher probability.

    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

    classify, classify, collect, collect, distinct, distinct, map, peek, sample, sample, sample, suchThat, suchThat, then
  • Method Details