Package jsonvalues.gen
Class JsBigIntGen
java.lang.Object
jsonvalues.gen.JsBigIntGen
- All Implemented Interfaces:
fun.gen.Gen<JsBigInt>
,Function<RandomGenerator,
Supplier<JsBigInt>>
Represents a JsBigInt generator. It can be created using the static factory methods
biased
and arbitrary
or, if none of the previous suit your
needs, from a big integer generator and the function map:
import fun.gen.Gen;
import jsonvalues.JsBigInt;
Gen<BigInteger> bigIntGen = seed -> () -> {...};
Gen<JsBigInt> jsBigIntGen = gen.map(JsBigInt::of)
Arbitrary generators produce uniformed distributions of values. Biased generators produce, with higher probability, potential problematic values that usually cause more bugs.
-
Method Summary
Modifier and TypeMethodDescriptionapply
(RandomGenerator seed) static fun.gen.Gen
<JsBigInt> static fun.gen.Gen
<JsBigInt> arbitrary
(BigInteger min, BigInteger max) static fun.gen.Gen
<JsBigInt> biased()
static fun.gen.Gen
<JsBigInt> biased
(BigInteger min, BigInteger max) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface fun.gen.Gen
classify, classify, collect, collect, distinct, distinct, map, peek, sample, sample, sample, suchThat, suchThat, then
-
Method Details
-
arbitrary
-
arbitrary
-
biased
-
biased
-
apply
- Specified by:
apply
in interfaceFunction<RandomGenerator,
Supplier<JsBigInt>>
-