SequenceArbitrary

@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
class SequenceArbitrary<T>(elementArbitrary: Arbitrary<T>) : ArbitraryDecorator<Sequence<T>> , SizableArbitrary<Sequence<T>>

Fluent interface to add functionality to arbitraries that generate instances of type Sequence

Constructors

SequenceArbitrary
Link copied to clipboard
fun <T> SequenceArbitrary(elementArbitrary: Arbitrary<T>)

Functions

allValues
Link copied to clipboard
open fun allValues(): Optional<Stream<Sequence<T>>>
array
Link copied to clipboard
open fun <A : Any> array(p0: Class<A>): ArrayArbitrary<Sequence<T>, A>
asGeneric
Link copied to clipboard
@API(status = API.Status.INTERNAL)
open fun asGeneric(): Arbitrary<Any>
collect
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun collect(p0: Predicate<MutableList<Sequence<T>>>): Arbitrary<MutableList<Sequence<T>>>
dontShrink
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.4.0")
open fun dontShrink(): Arbitrary<Sequence<T>>
edgeCases
Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL, since = "1.3.0")
open fun edgeCases(): EdgeCases<Sequence<T>>
open override fun edgeCases(p0: Int): EdgeCases<Sequence<T>>
@API(status = API.Status.EXPERIMENTAL, since = "1.3.9")
open fun edgeCases(p0: Consumer<EdgeCases.Config<Sequence<T>>>): Arbitrary<Sequence<T>>
exhaustive
Link copied to clipboard
@API(status = API.Status.INTERNAL)
open fun exhaustive(): Optional<ExhaustiveGenerator<Sequence<T>>>
open override fun exhaustive(p0: Long): Optional<ExhaustiveGenerator<Sequence<T>>>
filter
Link copied to clipboard
open fun filter(p0: Predicate<Sequence<T>>): Arbitrary<Sequence<T>>
fixGenSize
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.2.0")
open fun fixGenSize(p0: Int): Arbitrary<Sequence<T>>
flatMap
Link copied to clipboard
open fun <U : Any> flatMap(p0: Function<Sequence<T>, Arbitrary<U>>): Arbitrary<U>
forEachValue
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.1.2")
open fun forEachValue(p0: Consumer<in Sequence<T>>)
generator
Link copied to clipboard
open override fun generator(p0: Int): RandomGenerator<Sequence<T>>
@API(status = API.Status.INTERNAL, since = "1.4.0")
open fun generator(p0: Int, p1: Boolean): RandomGenerator<Sequence<T>>
generatorWithEmbeddedEdgeCases
Link copied to clipboard
open override fun generatorWithEmbeddedEdgeCases(p0: Int): RandomGenerator<Sequence<T>>
ignoreException
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.1")
open fun ignoreException(p0: Class<out Throwable>): Arbitrary<Sequence<T>>
injectDuplicates
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun injectDuplicates(p0: Double): Arbitrary<Sequence<T>>
injectNull
Link copied to clipboard
open fun injectNull(p0: Double): Arbitrary<Sequence<T>>
iterator
Link copied to clipboard
open operator fun iterator(): IteratorArbitrary<Sequence<T>>
list
Link copied to clipboard
open fun list(): ListArbitrary<Sequence<T>>
map
Link copied to clipboard
open fun <U : Any> map(p0: Function<Sequence<T>, U>): Arbitrary<U>
ofMaxSize
Link copied to clipboard
open override fun ofMaxSize(maxSize: Int): SequenceArbitrary<T>
ofMinSize
Link copied to clipboard
open override fun ofMinSize(minSize: Int): SequenceArbitrary<T>
ofSize
Link copied to clipboard
open override fun ofSize(size: Int): SequenceArbitrary<T>
fun ofSize(range: IntRange): SequenceArbitrary<T>
optional
Link copied to clipboard
open fun optional(): Arbitrary<Optional<Sequence<T>>>
@API(status = API.Status.MAINTAINED, since = "1.5.4")
open fun optional(p0: Double): Arbitrary<Optional<Sequence<T>>>
sample
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun sample(): Sequence<T>
sampleStream
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun sampleStream(): Stream<Sequence<T>>
set
Link copied to clipboard
open fun set(): SetArbitrary<Sequence<T>>
stream
Link copied to clipboard
open fun stream(): StreamArbitrary<Sequence<T>>
toString
Link copied to clipboard
open override fun toString(): String
tuple1
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun tuple1(): Arbitrary<Tuple.Tuple1<Sequence<T>>>
tuple2
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun tuple2(): Arbitrary<Tuple.Tuple2<Sequence<T>, Sequence<T>>>
tuple3
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun tuple3(): Arbitrary<Tuple.Tuple3<Sequence<T>, Sequence<T>, Sequence<T>>>
tuple4
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.0")
open fun tuple4(): Arbitrary<Tuple.Tuple4<Sequence<T>, Sequence<T>, Sequence<T>, Sequence<T>>>
tuple5
Link copied to clipboard
@API(status = API.Status.MAINTAINED, since = "1.3.3")
open fun tuple5(): Arbitrary<Tuple.Tuple5<Sequence<T>, Sequence<T>, Sequence<T>, Sequence<T>, Sequence<T>>>
typedClone
Link copied to clipboard
open fun <A : Arbitrary<*>> typedClone(): A
uniqueElements
Link copied to clipboard
fun uniqueElements(): SequenceArbitrary<T>

Add the constraint that elements of the generated iterator must be unique, i.e. no two elements must return true when being compared using Object.equals.

fun uniqueElements(by: Function<T, Any>): SequenceArbitrary<T>

Add the constraint that elements of the generated iterator must be unique relating to an element's "feature" being extracted using the by function. The extracted features are being compared using Object.equals.

withoutEdgeCases
Link copied to clipboard
@API(status = API.Status.EXPERIMENTAL, since = "1.4.0")
open fun withoutEdgeCases(): Arbitrary<Sequence<T>>
withSizeDistribution
Link copied to clipboard
open override fun withSizeDistribution(distribution: RandomDistribution): SequenceArbitrary<T>