Class/Object

hedgehog.core

GenT

Related Docs: object GenT | package core

Permalink

case class GenT[A](run: (Size, Seed) ⇒ Tree[(Seed, Option[A])]) extends Product with Serializable

Generator for random values of A.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GenT
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new GenT(run: (Size, Seed) ⇒ Tree[(Seed, Option[A])])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. def ensure(p: (A) ⇒ Boolean): GenT[A]

    Permalink

    Discards the generator if the generated value does not satisfy the predicate.

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def filter(p: (A) ⇒ Boolean): GenT[A]

    Permalink

    Generates a value that satisfies a predicate.

    Generates a value that satisfies a predicate.

    We keep some state to avoid looping forever. If we trigger these limits then the whole generator is discarded.

  9. def flatMap[B](f: (A) ⇒ GenT[B]): GenT[B]

    Permalink
  10. def forAll: PropertyT[A]

    Permalink
  11. def forAllWithLog(f: (A) ⇒ Log): PropertyT[A]

    Permalink
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def lift: PropertyT[A]

    Permalink
  15. def list(range: Range[Int]): GenT[List[A]]

    Permalink

    Generates a list using a 'Range' to determine the length.

  16. def log(name: Name): PropertyT[A]

    Permalink

    *******************************************************************

  17. def map[B](f: (A) ⇒ B): GenT[B]

    Permalink
  18. def mapTree[B](f: (Tree[(Seed, Option[A])]) ⇒ Tree[(Seed, Option[B])]): GenT[B]

    Permalink
  19. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  22. def option: GenT[Option[A]]

    Permalink

    Generates a 'None' some of the time.

  23. def prune: GenT[A]

    Permalink

    Throw away a generator's shrink tree.

  24. def resize(size: Size): GenT[A]

    Permalink

    Override the size parameter.

    Override the size parameter. Returns a generator which uses the given size instead of the runtime-size parameter.

  25. val run: (Size, Seed) ⇒ Tree[(Seed, Option[A])]

    Permalink
  26. def scale(f: (Size) ⇒ Size): GenT[A]

    Permalink

    Adjust the size parameter by transforming it with the given function.

  27. def shrink(f: (A) ⇒ List[A]): GenT[A]

    Permalink

    Apply a shrinking function to a generator.

  28. def small: GenT[A]

    Permalink

    Make a generator smaller by scaling its size parameter.

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def withFilter(p: (A) ⇒ Boolean): GenT[A]

    Permalink

    Generates a value that satisfies a predicate.

    Generates a value that satisfies a predicate.

    Equivalent to filter and is used in for-comprehensions.

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped