flatMapIndexedInternal

fun <T, R> ArbArgsGenerator<T>.flatMapIndexedInternal(transform: (index: Int, T, seedOffset: Int) -> Sequence<R>): ArbArgsGenerator<R>(source)

Maps the values this ArbArgsGenerator generates together with an index and a seed offset to a finite Sequence<R> with the help of the given transform function and then flattens them so that the resulting ArbArgsGenerator returns values of type R.

!! No backward compatibility guarantees !! Reuse at your own risk

In case VariistConfig.skip is null then the index starts at 0 otherwise at VariistConfig.skip.

Return

The resulting ArbArgsGenerator which generates values of type R.

Since

2.0.0

Parameters

transform

The transformation function which takes a T, an index and a seed offset and produces a finite Sequence of elements of type R. The seedOffset is passed along the call chain and should be taken into account when using ArbArgsGenerator.generate inside the transform function.

T

The type of values generated by this ArbArgsGenerator.

R

the type of elements of the Sequence generated by the resulting ArbArgsGenerator.


Maps the values this ArbArgsGenerator generates together with an index to a finite Sequence<R> with the help of the given transform function and then flattens them so that the resulting ArbArgsGenerator returns values of type R.

!! No backward compatibility guarantees !! Reuse at your own risk

In case VariistConfig.skip is null then the index starts at 0 otherwise at VariistConfig.skip and this regardless what offset is used in the end for SemiOrderedArgsGenerator.generate.

Use the overload which provides the seedOffset in case you use ArbArgsGenerator.generate inside the transform function, this way you can pass on the seedOffset to ArbArgsGenerator.generate.

Return

The resulting ArbArgsGenerator which generates values of type R.

Since

2.0.0

Parameters

transform

The transformation function which takes a T and an index and produces a finite Sequence of elements of type R.

T

The type of values generated by this ArbArgsGenerator.

R

the type of values generated by the resulting ArbArgsGenerator.