object Gen extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Gen
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Freq[A] = (Int, Gen[A])

    Int = Probability of being chosen.

    Int = Probability of being chosen. ≥ 0

  2. final class GenCharExt extends AnyVal
  3. final case class Now(millisSinceEpoch: Long) extends AnyVal with Product with Serializable
  4. type Run[+A] = (GenCtx) ⇒ A
  5. final case class ToNonEmptySeq[S, A](toSeq: (S) ⇒ Seq[A]) extends AnyVal with Product with Serializable

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. implicit def _GenCharExt(g: Gen[Char]): GenCharExt
    Annotations
    @inline()
  5. val alpha: Gen[Char]
  6. val alphaNumeric: Gen[Char]
  7. def apply2[A, B, Z](z: (A, B) ⇒ Z)(A: Gen[A], B: Gen[B]): Gen[Z]
  8. def apply3[A, B, C, Z](z: (A, B, C) ⇒ Z)(A: Gen[A], B: Gen[B], C: Gen[C]): Gen[Z]
  9. def apply4[A, B, C, D, Z](z: (A, B, C, D) ⇒ Z)(A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D]): Gen[Z]
  10. def apply5[A, B, C, D, E, Z](z: (A, B, C, D, E) ⇒ Z)(A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E]): Gen[Z]
  11. def apply6[A, B, C, D, E, F, Z](z: (A, B, C, D, E, F) ⇒ Z)(A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F]): Gen[Z]
  12. def apply7[A, B, C, D, E, F, G, Z](z: (A, B, C, D, E, F, G) ⇒ Z)(A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F], G: Gen[G]): Gen[Z]
  13. def apply8[A, B, C, D, E, F, G, H, Z](z: (A, B, C, D, E, F, G, H) ⇒ Z)(A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F], G: Gen[G], H: Gen[H]): Gen[Z]
  14. def apply9[A, B, C, D, E, F, G, H, I, Z](z: (A, B, C, D, E, F, G, H, I) ⇒ Z)(A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F], G: Gen[G], H: Gen[H], I: Gen[I]): Gen[Z]
  15. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  16. val ascii: Gen[Char]
  17. def batches[A](as: Vector[A], partitionSize: Inclusive, keepRemainder: Boolean = true): Gen[Vector[Vector[A]]]
  18. val boolean: Gen[Boolean]
  19. def byName[A](ga: ⇒ Gen[A]): Gen[A]
  20. def byNeed[A](ga: ⇒ Gen[A]): Gen[A]
  21. def byte: Gen[Byte]
  22. def char: Gen[Char]

    An alias for unicode, as unicode is the default.

    An alias for unicode, as unicode is the default.

    Annotations
    @inline()
  23. def choose[A](a: A, as: A*): Gen[A]
  24. def chooseArray_![A](as: Array[A]): Gen[A]

    Randomly selects one of the given elements.

    Randomly selects one of the given elements.

    as

    Possible elements. MUST NOT BE EMPTY.

  25. def chooseChar(nonEmptinessProof: Char, s: String, rs: NumericRange[Char]*): Gen[Char]
  26. def chooseChar(nonEmptinessProof: Char, rs: NumericRange[Char]*): Gen[Char]
  27. def chooseChar_!(rs: NumericRange[Char]*): Gen[Char]
  28. def chooseChar_!(s: String, rs: NumericRange[Char]*): Gen[Char]
  29. def chooseDouble(l: Double, h: Double): Gen[Double]

    Args are inclusive.

    Args are inclusive. [l,h]

  30. def chooseFloat(l: Float, h: Float): Gen[Float]

    Args are inclusive.

    Args are inclusive. [l,h]

  31. def chooseGen[A](g1: Gen[A], gn: Gen[A]*): Gen[A]
  32. def chooseGenNE[S, G, A](s: S)(implicit ne: ToNonEmptySeq[S, G], g: <:<[G, Gen[A]]): Gen[A]
  33. def chooseGen_![A](gens: scala.collection.compat.IterableOnce[Gen[A]]): Gen[A]
  34. def chooseIndexed_![A](as: IndexedSeq[A]): Gen[A]

    Randomly selects one of the given elements.

    Randomly selects one of the given elements.

    as

    Possible elements. MUST NOT BE EMPTY.

  35. def chooseInt(l: Int, h: Int): Gen[Int]

    Args are inclusive.

    Args are inclusive. [l,h]

  36. def chooseInt(bound: Int): Gen[Int]

    Generate an int ∈ [0,bound).

    Generate an int ∈ [0,bound).

    bound

    Upper-bound (exclusive). > 0

  37. def chooseLong(l: Long, h: Long): Gen[Long]

    Args are inclusive.

    Args are inclusive. [l,h]

  38. def chooseLong(bound: Long): Gen[Long]

    Generate a long ∈ [0,bound).

    Generate a long ∈ [0,bound).

    bound

    Upper-bound (exclusive). > 0

  39. def chooseNE[S, A](s: S)(implicit ne: ToNonEmptySeq[S, A]): Gen[A]
  40. val chooseSize: Gen[Int]

    Returns a number in [0,GenSize)

  41. val chooseSizeMin1: Gen[Int]

    Returns a number in [1,GenSize)

  42. def choose_![A](as: scala.collection.compat.IterableOnce[A]): Gen[A]

    Randomly selects one of the given elements.

    Randomly selects one of the given elements.

    as

    Possible elements. MUST NOT BE EMPTY.

  43. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  44. def dateTime(implicit genNow: Gen[Now]): DateTimeBuilder
  45. def distribute[F[_], B](a: Gen[F[B]])(implicit D: Distributive[F]): F[Gen[B]]
  46. def distributeK[F[_], A, B](a: Gen[Kleisli[F, A, B]])(implicit D: Distributive[F]): Kleisli[F, A, Gen[B]]
  47. def distributeR[A, B](a: Gen[(A) ⇒ B]): (A) ⇒ Gen[B]
  48. def distributeRK[A, B](a: Gen[(A) ⇒ B]): Kleisli[Gen, A, B]
  49. val double: Gen[Double]
  50. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  51. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  52. def fairlyDistributed[A](as: Iterable[A]): Gen[Iterator[A]]

    Ensures that an element is never chosen more than once per n elements.

    Ensures that an element is never chosen more than once per n elements.

    fairlyDistributedSeq(1, 2, 3)(6) may return [1,3,2,2,1,3] or [3,2,1,3,2,1] but never [1,1,1,1,2,3].

  53. def fairlyDistributedSeq[A](as: Iterable[A])(implicit ss: SizeSpec): Gen[Vector[A]]

    Ensures that an element is never chosen more than once per n elements.

    Ensures that an element is never chosen more than once per n elements.

    fairlyDistributedSeq(1, 2, 3)(6) may return [1,3,2,2,1,3] or [3,2,1,3,2,1] but never [1,1,1,1,2,3].

  54. def float: Gen[Float]
  55. def frequency[A](x: Freq[A], xs: Freq[A]*): Gen[A]
  56. def frequencyL_![A](xs: List[Freq[A]]): Gen[A]
  57. def frequencyNE[S, F, A](s: S)(implicit ne: ToNonEmptySeq[S, F], f: <:<[Seq[F], Seq[Freq[A]]]): Gen[A]
  58. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  59. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  60. val int: Gen[Int]
  61. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  62. def lazily[A](ga: ⇒ Gen[A]): Gen[A]
    Annotations
    @inline()
  63. def lift2[A, B, Z](A: Gen[A], B: Gen[B])(z: (A, B) ⇒ Z): Gen[Z]
    Annotations
    @inline()
  64. def lift3[A, B, C, Z](A: Gen[A], B: Gen[B], C: Gen[C])(z: (A, B, C) ⇒ Z): Gen[Z]
    Annotations
    @inline()
  65. def lift4[A, B, C, D, Z](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D])(z: (A, B, C, D) ⇒ Z): Gen[Z]
    Annotations
    @inline()
  66. def lift5[A, B, C, D, E, Z](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E])(z: (A, B, C, D, E) ⇒ Z): Gen[Z]
    Annotations
    @inline()
  67. def lift6[A, B, C, D, E, F, Z](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F])(z: (A, B, C, D, E, F) ⇒ Z): Gen[Z]
    Annotations
    @inline()
  68. def lift7[A, B, C, D, E, F, G, Z](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F], G: Gen[G])(z: (A, B, C, D, E, F, G) ⇒ Z): Gen[Z]
    Annotations
    @inline()
  69. def lift8[A, B, C, D, E, F, G, H, Z](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F], G: Gen[G], H: Gen[H])(z: (A, B, C, D, E, F, G, H) ⇒ Z): Gen[Z]
    Annotations
    @inline()
  70. def lift9[A, B, C, D, E, F, G, H, I, Z](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F], G: Gen[G], H: Gen[H], I: Gen[I])(z: (A, B, C, D, E, F, G, H, I) ⇒ Z): Gen[Z]
    Annotations
    @inline()
  71. val long: Gen[Long]
  72. val lower: Gen[Char]
  73. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  74. val negativeDouble: Gen[Double]
  75. def negativeFloat: Gen[Float]
  76. val negativeInt: Gen[Int]
  77. val negativeLong: Gen[Long]
  78. def newOrOld[A](newGen: ⇒ Gen[A], old: ⇒ scala.collection.compat.IterableOnce[A]): Gen[A]

    Randomly either generates a new value, or chooses one from a known set.

  79. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  80. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  81. val numeric: Gen[Char]
  82. def orderedSeq[A](orderedElems: Iterable[A], maxDups: Int, dropElems: Boolean = true, emptyResult: Boolean = true): Gen[Vector[A]]

    Generates a sequence of elements in a fixed order.

    Generates a sequence of elements in a fixed order.

    Example: [a,b,c] can generate [a,b,c], [a,b,b,b,c,c], etc. but never [b,a,c].

    orderedElems

    Legal elements in a relevant order.

    maxDups

    The maximum number of consecutive, duplicate elements (can be 0).

    dropElems

    Whether or not the generator can drop elements. (eg. drop b and return [a,c])

    emptyResult

    Whether or not the generator can return an empty vector as a result.

  83. def point[A](a: ⇒ A): Gen[A]
  84. val positiveDouble: Gen[Double]
  85. def positiveFloat: Gen[Float]
  86. val positiveInt: Gen[Int]
  87. val positiveLong: Gen[Long]
  88. def pure[A](a: A): Gen[A]
  89. lazy val reseed: Gen[Unit]

    Apply a new, non-deterministic seed.

  90. implicit val scalazInstance: Monad[Gen] with Distributive[Gen] with BindRec[Gen]
  91. def sequence[T[X] <: Iterable[X], A](gs: T[Gen[A]])(implicit cbf: BuildFrom[T[Gen[A]], A, T[A]]): Gen[T[A]]
    Annotations
    @inline()
  92. def sequenceZ[T[_], A](gs: T[Gen[A]])(implicit T: Traverse[T]): Gen[T[A]]
  93. def setConstSeed(seed: Long): Gen[Unit]
  94. def setOptionalConstSeed(o: Option[Long]): Gen[Unit]
  95. def setOptionalSeed(o: Option[Long]): Gen[Unit]
  96. def setSeed(seed: Long): Gen[Unit]
  97. def setSeedBy(f: (SeedCtx) ⇒ Long): Gen[Unit]
  98. def short: Gen[Short]
  99. def shuffle[A, C[X] <: Iterable[X]](as: C[A])(implicit bf: BuildFrom[C[A], A, C[A]]): Gen[C[A]]
    Annotations
    @inline()
  100. def string(implicit ss: SizeSpec): Gen[String]
  101. def string1(implicit ss: SizeSpec): Gen[String]
  102. def stringOf(cs: Gen[Char])(implicit ss: SizeSpec): Gen[String]
  103. def stringOf1(cs: Gen[Char])(implicit ss: SizeSpec): Gen[String]
  104. def subset[A, C[X] <: Iterable[X]](as: C[A])(implicit bf: scala.collection.compat.Factory[A, C[A]]): Gen[C[A]]
    Annotations
    @inline()
  105. def subset1[A, C[X] <: IndexedSeq[X]](as: C[A])(implicit bf: scala.collection.compat.Factory[A, C[A]]): Gen[C[A]]

    Generates a non-empty subset, unless the underlying seq is empty (in which case this returns an empty seq too).

    Generates a non-empty subset, unless the underlying seq is empty (in which case this returns an empty seq too).

    Annotations
    @inline()
  106. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  107. def tailrec[A, B](f: (A) ⇒ Gen[Either[A, B]])(a: A): Gen[B]
  108. def toString(): String
    Definition Classes
    AnyRef → Any
  109. def traverse[T[X] <: Iterable[X], A, B](as: T[A])(f: (A) ⇒ Gen[B])(implicit cbf: BuildFrom[T[A], B, T[B]]): Gen[T[B]]
  110. def traverseG[T[X] <: Iterable[X], A, B](gs: T[Gen[A]])(f: (A) ⇒ Gen[B])(implicit cbf: BuildFrom[T[Gen[A]], B, T[B]]): Gen[T[B]]
  111. def traverseZ[T[_], A, B](as: T[A])(f: (A) ⇒ Gen[B])(implicit T: Traverse[T]): Gen[T[B]]
  112. def traverseZG[T[_], A, B](gs: T[Gen[A]])(f: (A) ⇒ Gen[B])(implicit T: Traverse[T]): Gen[T[B]]
  113. def tryChoose[A](as: scala.collection.compat.IterableOnce[A]): Gen[Option[A]]
  114. def tryGenChoose[A](as: scala.collection.compat.IterableOnce[A]): Option[Gen[A]]
  115. def tryGenChooseLazily[A](as: scala.collection.compat.IterableOnce[A]): Option[Gen[A]]
  116. def tuple2[A, B](A: Gen[A], B: Gen[B]): Gen[(A, B)]
  117. def tuple3[A, B, C](A: Gen[A], B: Gen[B], C: Gen[C]): Gen[(A, B, C)]
  118. def tuple4[A, B, C, D](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D]): Gen[(A, B, C, D)]
  119. def tuple5[A, B, C, D, E](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E]): Gen[(A, B, C, D, E)]
  120. def tuple6[A, B, C, D, E, F](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F]): Gen[(A, B, C, D, E, F)]
  121. def tuple7[A, B, C, D, E, F, G](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F], G: Gen[G]): Gen[(A, B, C, D, E, F, G)]
  122. def tuple8[A, B, C, D, E, F, G, H](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F], G: Gen[G], H: Gen[H]): Gen[(A, B, C, D, E, F, G, H)]
  123. def tuple9[A, B, C, D, E, F, G, H, I](A: Gen[A], B: Gen[B], C: Gen[C], D: Gen[D], E: Gen[E], F: Gen[F], G: Gen[G], H: Gen[H], I: Gen[I]): Gen[(A, B, C, D, E, F, G, H, I)]
  124. val unicode: Gen[Char]
  125. def unit: Gen[Unit]
  126. val upper: Gen[Char]
  127. def uuid: Gen[UUID]
  128. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  129. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  130. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  131. lazy val zoneId: Gen[ZoneId]

    Caution: non-deterministic

  132. object Now extends Serializable
  133. object ToNonEmptySeq extends Serializable

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped