object Gen extends GenZIO with Serializable
- Alphabetic
- By Inheritance
- Gen
- Serializable
- GenZIO
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final val alphaNumericChar: Gen[Random, Char]
A generator of alphanumeric characters.
A generator of alphanumeric characters. Shrinks toward '0'.
- final val anyByte: Gen[Random, Byte]
A generator of bytes.
A generator of bytes. Shrinks toward '0'.
- final val anyChar: Gen[Random, Char]
A generator of characters.
A generator of characters. Shrinks toward '0'.
- final val anyFloat: Gen[Random, Float]
A generator of integers.
A generator of integers. Shrinks toward '0'.
- final val anyInt: Gen[Random, Int]
A generator of integers.
A generator of integers. Shrinks toward '0'.
- final val anyLong: Gen[Random, Long]
A generator of longs.
A generator of longs. Shrinks toward '0'.
- final val anyShort: Gen[Random, Short]
A generator of shorts.
A generator of shorts. Shrinks toward '0'.
- final val anyString: Gen[Random with Sized, String]
A generator of strings.
A generator of strings. Shrinks towards the empty string.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- final val boolean: Gen[Random, Boolean]
A generator of booleans.
A generator of booleans. Shrinks toward 'false'.
- final def byte(min: Byte, max: Byte): Gen[Random, Byte]
A generator of byte values inside the specified range: [start, end].
A generator of byte values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
- final def chained[R <: Random with Sized, Env, E, A](gen: Gen[R, ZIO[Env, E, A]]): Gen[R, ZIO[Env, E, A]]
A generator of effects that are the result of chaining the specified effect with itself a random number of times.
A generator of effects that are the result of chaining the specified effect with itself a random number of times.
- Definition Classes
- GenZIO
- final def chainedN[R <: Random, Env, E, A](n: Int)(zio: Gen[R, ZIO[Env, E, A]]): Gen[R, ZIO[Env, E, A]]
A generator of effects that are the result of chaining the specified effect with itself a given number of times.
A generator of effects that are the result of chaining the specified effect with itself a given number of times.
- Definition Classes
- GenZIO
- final def char(min: Char, max: Char): Gen[Random, Char]
A generator of character values inside the specified range: [start, end].
A generator of character values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def concurrent[R, E, A](zio: ZIO[R, E, A]): Gen[Any, ZIO[R, E, A]]
A generator of effects that are the result of applying concurrency combinators to the specified effect that are guaranteed not to change its value.
A generator of effects that are the result of applying concurrency combinators to the specified effect that are guaranteed not to change its value.
- Definition Classes
- GenZIO
- final def const[A](a: => A): Gen[Any, A]
A constant generator of the specified value.
- final def constSample[R, A](sample: => Sample[R, A]): Gen[R, A]
A constant generator of the specified sample.
- final def died[R](gen: Gen[R, Throwable]): Gen[R, ZIO[Any, Nothing, Nothing]]
A generator of effects that have died with a
Throwable.A generator of effects that have died with a
Throwable.- Definition Classes
- GenZIO
- final def double(min: Double, max: Double): Gen[Random, Double]
A generator of double values inside the specified range: [start, end].
A generator of double values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
- final def either[R <: Random, A, B](left: Gen[R, A], right: Gen[R, B]): Gen[R, Either[A, B]]
- final def elements[A](as: A*): Gen[Random, A]
- final val empty: Gen[Any, Nothing]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final val exponential: Gen[Random, Double]
A generator of exponentially distributed doubles with mean
1.A generator of exponentially distributed doubles with mean
1. The shrinker will shrink toward0. - final def failures[R, E](gen: Gen[R, E]): Gen[R, ZIO[Any, E, Nothing]]
A generator of effects that have failed with an error.
A generator of effects that have failed with an error.
- Definition Classes
- GenZIO
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def fromEffect[R, A](effect: ZIO[R, Nothing, A]): Gen[R, A]
Constructs a generator from an effect that constructs a value.
- final def fromEffectSample[R, A](effect: ZIO[R, Nothing, Sample[R, A]]): Gen[R, A]
Constructs a generator from an effect that constructs a sample.
- final def fromIterable[R, A](as: Iterable[A], shrinker: (A) => ZStream[R, Nothing, A] = (_: A) => ZStream.empty): Gen[R, A]
Constructs a deterministic generator that only generates the specified fixed values.
- final def fromRandom[A](f: (Service[Any]) => UIO[A]): Gen[Random, A]
Constructs a generator from a function that uses randomness.
Constructs a generator from a function that uses randomness. The returned generator will not have any shrinking.
- final def fromRandomSample[R <: Random, A](f: (Service[Any]) => UIO[Sample[R, A]]): Gen[R, A]
Constructs a generator from a function that uses randomness to produce a sample.
- final def function[R, A, B](gen: Gen[R, B]): Gen[R, (A) => B]
Constructs a generator of functions from
AtoBgiven a generator ofBvalues.Constructs a generator of functions from
AtoBgiven a generator ofBvalues. TwoAvalues will be considered to be equal, and thus will be guaranteed to generate the sameBvalue, if they have the samehashCode. - final def functionWith[R, A, B](gen: Gen[R, B])(hash: (A) => Int): Gen[R, (A) => B]
Constructs a generator of functions from
AtoBgiven a generator ofBvalues and a hashing function forAvalues.Constructs a generator of functions from
AtoBgiven a generator ofBvalues and a hashing function forAvalues. TwoAvalues will be considered to be equal, and thus will be guaranteed to generate the sameBvalue, if they have have the same hash. This is useful whenAdoes not implementhashCodein a way that is constent with equality. - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def int(min: Int, max: Int): Gen[Random, Int]
A generator of integers inside the specified range: [start, end].
A generator of integers inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
- final def integral[A](min: A, max: A)(implicit I: Integral[A]): Gen[Random, A]
A generator of integral values inside the specified range: [start, end].
A generator of integral values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def large[R <: Random with Sized, A](f: (Int) => Gen[R, A], min: Int = 0): Gen[R, A]
A sized generator that uses a uniform distribution of size values.
A sized generator that uses a uniform distribution of size values. A large number of larger sizes will be generated.
- final def listOf[R <: Random with Sized, A](g: Gen[R, A]): Gen[R, List[A]]
- final def listOf1[R <: Random with Sized, A](g: Gen[R, A]): Gen[R, List[A]]
- final def listOfN[R <: Random, A](n: Int)(g: Gen[R, A]): Gen[R, List[A]]
- final def medium[R <: Random with Sized, A](f: (Int) => Gen[R, A], min: Int = 0): Gen[R, A]
A sized generator that uses an exponential distribution of size values.
A sized generator that uses an exponential distribution of size values. The majority of sizes will be towards the lower end of the range but some larger sizes will be generated as well.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final val none: Gen[Any, Option[Nothing]]
A constant generator of the empty value.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def oneOf[R <: Random, A](as: Gen[R, A]*): Gen[R, A]
- final def option[R <: Random, A](gen: Gen[R, A]): Gen[R, Option[A]]
A generator of optional values.
A generator of optional values. Shrinks toward
None. - final def parallel[R, E, A](zio: ZIO[R, E, A]): Gen[Any, ZIO[R, E, A]]
A generator of effects that are the result of applying parallelism combinators to the specified effect that are guaranteed not to change its value.
A generator of effects that are the result of applying parallelism combinators to the specified effect that are guaranteed not to change its value.
- Definition Classes
- GenZIO
- final def partialFunction[R <: Random, A, B](gen: Gen[R, B]): Gen[R, PartialFunction[A, B]]
Constructs a generator of partial functions from
AtoBgiven a generator ofBvalues.Constructs a generator of partial functions from
AtoBgiven a generator ofBvalues. TwoAvalues will be considered to be equal, and thus will be guaranteed to generate the sameBvalue or both be outside the partial functon's domain, if they have the samehashCode. - final def partialFunctionWith[R <: Random, A, B](gen: Gen[R, B])(hash: (A) => Int): Gen[R, PartialFunction[A, B]]
Constructs a generator of partial functions from
AtoBgiven a generator ofBvalues and a hashing function forAvalues.Constructs a generator of partial functions from
AtoBgiven a generator ofBvalues and a hashing function forAvalues. TwoAvalues will be considered to be equal, and thus will be guaranteed to generate the sameBvalue or both be outside the partial function's domain, if they have have the same hash. This is useful whenAdoes not implementhashCodein a way that is constent with equality. - final val printableChar: Gen[Random, Char]
A generator of printable characters.
A generator of printable characters. Shrinks toward '!'.
- final def short(min: Short, max: Short): Gen[Random, Short]
A generator of short values inside the specified range: [start, end].
A generator of short values inside the specified range: [start, end]. The shrinker will shrink toward the lower end of the range ("smallest").
- final def size: Gen[Sized, Int]
- final def sized[R <: Sized, A](f: (Int) => Gen[R, A]): Gen[R, A]
A sized generator, whose size falls within the specified bounds.
- final def small[R <: Random with Sized, A](f: (Int) => Gen[R, A], min: Int = 0): Gen[R, A]
A sized generator that uses an exponential distribution of size values.
A sized generator that uses an exponential distribution of size values. The values generated will be strongly concentrated towards the lower end of the range but a few larger values will still be generated.
- final def some[R, A](gen: Gen[R, A]): Gen[R, Option[A]]
- final def string[R <: Random with Sized](char: Gen[R, Char]): Gen[R, String]
- final def string1[R <: Random with Sized](char: Gen[R, Char]): Gen[R, String]
- final def stringN[R <: Random](n: Int)(char: Gen[R, Char]): Gen[R, String]
- final def successes[R, A](gen: Gen[R, A]): Gen[R, ZIO[Any, Nothing, A]]
A generator of successful effects.
A generator of successful effects.
- Definition Classes
- GenZIO
- final def suspend[R, A](gen: => Gen[R, A]): Gen[R, A]
Lazily constructs a generator.
Lazily constructs a generator. This is useful to avoid infinite recursion when creating generators that refer to themselves.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final val throwable: Gen[Random, Throwable]
A generator of throwables.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def uniform: Gen[Random, Double]
A generator of uniformly distributed doubles between [0, 1].
A generator of uniformly distributed doubles between [0, 1]. The shrinker will shrink toward
0. - final val unit: Gen[Any, Unit]
A constant generator of the unit value.
- final def vectorOf[R <: Random with Sized, A](g: Gen[R, A]): Gen[R, Vector[A]]
- final def vectorOf1[R <: Random with Sized, A](g: Gen[R, A]): Gen[R, Vector[A]]
- final def vectorOfN[R <: Random, A](n: Int)(g: Gen[R, A]): Gen[R, Vector[A]]
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def weighted[R <: Random, A](gs: (Gen[R, A], Double)*): Gen[R, A]