Class JsTupleGen

  • All Implemented Interfaces:
    fun.gen.Gen<JsArray>, Function<Random,​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 passing the original one to the split generator .
    • Method Detail

      • 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 generators
        Returns:
        a JsArray generator
      • apply

        public Supplier<JsArray> apply​(Random seed)
        Returns a supplier from the specified seed that generates a new tuple, modeled with a JsArray, each time it's called
        Specified by:
        apply in interface Function<Random,​Supplier<JsArray>>
        Parameters:
        seed - the generator seed
        Returns:
        a tuple supplier