java.lang.Object
jsonvalues.gen.JsArrayGen
Represents a JsArray generator. It can be created from the static factory methods biased and
arbitrary, specifying an element generator that produces JsValue and the size of the array
(either a bound interval or a fixed size).
-
Method Summary
Modifier and TypeMethodDescriptionReturns a supplier from the specified seed that generates a new JsArray each time it's calledstatic fun.gen.Gen<JsArray>returns an fixed-size array generatorstatic fun.gen.Gen<JsArray>returns an array generatorstatic fun.gen.Gen<JsArray>returns a biased array generatorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fun.gen.Gen
map, peek, sample, sample, sample, suchThat, suchThat, then
-
Method Details
-
arbitrary
returns an fixed-size array generator- Parameters:
gen- the element generatorsize- the size of the generated array- Returns:
- a JsArray generator
-
arbitrary
public static fun.gen.Gen<JsArray> arbitrary(fun.gen.Gen<? extends JsValue> gen, int minSize, int maxSize) returns an array generator- Parameters:
gen- the element generatorminSize- the minimum size of the arraysmaxSize- the maximum size of the arrays- Returns:
- a JsArray generator
-
biased
public static fun.gen.Gen<JsArray> biased(fun.gen.Gen<? extends JsValue> gen, int minSize, int maxSize) returns a biased array generator- Parameters:
gen- the element generatorminSize- the minimum size of the arraysmaxSize- the maximum size of the arrays- Returns:
- a JsArray generator
-
apply
Returns a supplier from the specified seed that generates a new JsArray each time it's called
-