final case class Gen[+A](run: Run[A]) extends AnyVal with GenClassExt[A] with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, GenClassExt[A], AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Gen
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. GenClassExt
  7. AnyVal
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Gen(run: Run[A])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. def ***[B](g: Gen[B]): Gen[(A, B)]
  4. def +++[B](g: Gen[B]): Gen[\/[A, B]]
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  6. def >>[B](f: Gen[B]): Gen[B]
  7. def \&/[B](g: Gen[B]): Gen[\&/[A, B]]
  8. def \/[B](g: Gen[B]): Gen[\/[A, B]]
  9. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  10. def either[B](g: Gen[B]): Gen[Either[A, B]]
  11. def fill[B](n: Int)(implicit cbf: scala.collection.compat.Factory[A, B]): Gen[B]
  12. def fillFold[B](n: Int, z: B)(f: (B, A) ⇒ B): Gen[B]
  13. def fillFoldSS[B](ss: SizeSpec, z: B)(f: (B, A) ⇒ B): Gen[B]
    Annotations
    @inline()
  14. def fillFoldSS1[B](ss: SizeSpec, z: B)(f: (B, A) ⇒ B): Gen[B]
    Annotations
    @inline()
  15. def fillSS[B](ss: SizeSpec)(implicit cbf: scala.collection.compat.Factory[A, B]): Gen[B]
    Annotations
    @inline()
  16. def fillSS1[B](ss: SizeSpec)(implicit cbf: scala.collection.compat.Factory[A, B]): Gen[B]
    Annotations
    @inline()
  17. def flatMap[B](f: (A) ⇒ Gen[B]): Gen[B]
  18. def flatten[B](implicit ev: <:<[A, Gen[B]]): Gen[B]
  19. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def list(implicit ss: SizeSpec): Gen[List[A]]
  22. def list1(implicit ss: SizeSpec): Gen[List[A]]
  23. def map[B](f: (A) ⇒ B): Gen[B]
  24. def mapBy[K](gk: Gen[K])(implicit ss: SizeSpec): Gen[Map[K, A]]
  25. def mapByEachKey[K](keys: Iterable[K]): Gen[Map[K, A]]
  26. def mapByKeySubset[K](legalKeys: Iterable[K]): Gen[Map[K, A]]
  27. def mapTo[K >: A, V](gv: Gen[V])(implicit ss: SizeSpec): Gen[Map[K, V]]
    Annotations
    @inline()
  28. def nyayaNEL(implicit ss: SizeSpec): Gen[NonEmptyList[A]]
  29. def option: Gen[Option[A]]
  30. def optionGet[B](implicit ev: <:<[A, Option[B]]): Gen[B]

    Will keep generating options until one is defined, in which case it is returned.

    Will keep generating options until one is defined, in which case it is returned.

    If a non-empty option still isn't generated after 1000 attempts, an exception will be thrown.

    It is recommended that you use this very sparingly. In nearly all cases, the better alternative is to write your generators such that a return value is guaranteed, rather than generating then discarding.

  31. def optionGetLimit[B](maxAttempts: Int)(implicit ev: <:<[A, Option[B]]): Gen[B]
  32. def pair: Gen[(A, A)]
  33. val run: Run[A]
  34. def sample(): A

    Produce a sample datum.

  35. def samples(genSize: GenSize = GenSize.Default): Iterator[A]

    Produce an infinite stream of generated data.

    Produce an infinite stream of generated data.

    Use .take(n) for a finite number of samples.

  36. def samplesUsing(ctx: GenCtx): Iterator[A]

    Produce an infinite stream of generated data.

    Produce an infinite stream of generated data.

    Use .take(n) for a finite number of samples.

  37. def scalazNEL[B >: A](implicit ss: SizeSpec): Gen[NonEmptyList[B]]
  38. def set[B >: A](implicit ss: SizeSpec): Gen[Set[B]]
  39. def set1[B >: A](implicit ss: SizeSpec): Gen[Set[B]]
  40. def shuffle[C[X] <: Iterable[X], B](implicit ev: <:<[A, C[B]], cbf: BuildFrom[C[B], B, C[B]]): Gen[C[B]]
  41. def sizedSet[B >: A](implicit ss: SizeSpec): Gen[Set[B]]

    This will ensure that only unique random data is used and that the resulting set has the desired size.

    This will ensure that only unique random data is used and that the resulting set has the desired size.

    This is dangerous in that it will block until it generates enough unique elements. For example, Gen.bool.sizedSet(3) will never return.

  42. def sizedSet1[B >: A](implicit ss: SizeSpec): Gen[Set[B]]

    This will ensure that only unique random data is used and that the resulting set has the desired size.

    This will ensure that only unique random data is used and that the resulting set has the desired size.

    This is dangerous in that it will block until it generates enough unique elements. For example, Gen.bool.sizedSet1(3) will never return.

  43. def strengthL[B](b: B): Gen[(B, A)]
  44. def strengthR[B](b: B): Gen[(A, B)]
  45. def subset[C[X] <: Iterable[X], B](implicit ev: <:<[A, C[B]], cbf: scala.collection.compat.Factory[B, C[B]]): Gen[C[B]]
  46. def subset1[C[X] <: IndexedSeq[X], B](implicit ev: <:<[A, C[B]], cbf: scala.collection.compat.Factory[B, C[B]]): Gen[C[B]]

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

  47. def take[C[X] <: Iterable[X], B](n: SizeSpec)(implicit ev: <:<[A, C[B]], cbf: scala.collection.compat.Factory[B, C[B]]): Gen[C[B]]
  48. def triple: Gen[(A, A, A)]
  49. def vector(implicit ss: SizeSpec): Gen[Vector[A]]
  50. def vector1(implicit ss: SizeSpec): Gen[Vector[A]]
  51. def withConstSeed(seed: Long): Gen[A]
  52. def withFilter(p: (A) ⇒ Boolean): Gen[A]
  53. def withOptionalConstSeed(s: Option[Long]): Gen[A]
  54. def withOptionalSeed(s: Option[Long]): Gen[A]
  55. def withSeed(seed: Long): Gen[A]

Deprecated Value Members

  1. def nel[B >: A](implicit ss: SizeSpec): Gen[NonEmptyList[B]]
    Annotations
    @deprecated
    Deprecated

    (Since version 0.7.0) Replace with scalazNEL.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from GenClassExt[A]

Inherited from AnyVal

Inherited from Any

Ungrouped