Class JsTupleGen

java.lang.Object
jsonvalues.gen.JsTupleGen
All Implemented Interfaces:
fun.gen.Gen<JsArray>, Function<RandomGenerator,Supplier<JsArray>>

public final class JsTupleGen extends Object implements fun.gen.Gen<JsArray>
Represents a tuple generator that is modeled with a JsArray generator. Each generator of the tuple is created from a new seed that is calculated by passing the original one to the split generator.
  • Method Details

    • of

      @SafeVarargs public static fun.gen.Gen<JsArray> of(fun.gen.Gen<? extends JsValue> gen, fun.gen.Gen<? extends JsValue>... others)
      Returns a tuple generator. The tuple is modeled with a JsArray. Each element generator is independent of each other, being created from a different seed.
      Parameters:
      gen - The head element generator.
      others - The rest of the generators.
      Returns:
      A JsArray generator.
    • of

      public static fun.gen.Gen<JsArray> of(List<fun.gen.Gen<? extends JsValue>> gens)
    • apply

      public Supplier<JsArray> apply(RandomGenerator seed)
      Specified by:
      apply in interface Function<RandomGenerator,Supplier<JsArray>>