transformMaterialised

Generates size values, transforms and materialises them and creates a new OrderedArgsGenerator based on it.

Return

The resulting OrderedArgsGenerator which generates values of type R.

Since

2.0.0

Parameters

transform

The transformation function which takes a Sequence of type T and produces a finite Sequence of type R (since we materialise you will run into a OutOfMemoryException if your resulting Sequence is too big/infinite).

T

The type of values generated by this OrderedArgsGenerator.

R

the type of values generated by the resulting OrderedArgsGenerator.


Deprecated (with error)

" Materialising means fixing the undefined/random part of an SemiOrderedArgsGenerator. Normally you do not want to turn an SemiOrderedArgsGenerator into an OrderedArgsGenerator as you basically loose the randomness you added in the first place. If you still want to do this, then use: let { g -> g.generate().take(g.size) }.let(transform).toList().let(ordered::fromList)

Replace with

let { g -> g.generate().take(g.size) }.filter(predicate).toList().let(ordered::fromList)