Package jsonvalues.gen
Class JsInstantGen
- java.lang.Object
-
- jsonvalues.gen.JsInstantGen
-
public final class JsInstantGen extends Object implements fun.gen.Gen<JsInstant>
Represents a JsInstant generator. It can be created using the static factory methodsbiasedandarbitraryor, if none of the previous suit your needs, from a double generator and the function map:import fun.gen.Gen; import jsonvalues.JsInstant; Gen<Instant> instantGen = seed -> () -> {...}; Gen<JsInstant> jsInstantGen = gen.map(JsInstant::of)Arbitrary generators produces uniformed distributions of values. Biased generators produces, with higher probability, potential problematic values that usually cause more bugs.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Supplier<JsInstant>apply(Random seed)Returns a supplier from the specified seed that generates a new JsInstant each time it's calledstatic fun.gen.Gen<JsInstant>arbitrary()static fun.gen.Gen<JsInstant>arbitrary(long min, long max)static fun.gen.Gen<JsInstant>arbitrary(ZonedDateTime min, ZonedDateTime max)static fun.gen.Gen<JsInstant>biased()static fun.gen.Gen<JsInstant>biased(long min, long max)
-
-
-
Method Detail
-
biased
public static fun.gen.Gen<JsInstant> biased()
-
arbitrary
public static fun.gen.Gen<JsInstant> arbitrary()
-
arbitrary
public static fun.gen.Gen<JsInstant> arbitrary(long min, long max)
-
arbitrary
public static fun.gen.Gen<JsInstant> arbitrary(ZonedDateTime min, ZonedDateTime max)
-
biased
public static fun.gen.Gen<JsInstant> biased(long min, long max)
-
-