Packages

t

hedgehog

MonadGenOps

trait MonadGenOps[M[_]] extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MonadGenOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def discard[A](implicit G: MonadGen[M]): M[A]

    Discards the whole generator.

  7. def ensure[A](gen: M[A], p: (A) => Boolean)(implicit F: Monad[M], G: MonadGen[M]): M[A]

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

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def filter[A](gen: M[A])(p: (A) => Boolean)(implicit F: Monad[M], G: MonadGen[M]): M[A]

    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.

  11. def fromSome[A](gen: M[Option[A]])(implicit F: Monad[M], G: MonadGen[M]): M[A]

    Runs a Option generator until it produces a Some.

    Runs a Option generator until it produces a Some.

    This is implemented using filter and has the same caveats.

  12. def generate[A](f: (Size, Seed) => (Seed, A))(implicit G: MonadGen[M]): M[A]

    Construct a generator that depends on the size parameter.

  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def integral[A](range: Range[A], fromLong: (Long) => A)(implicit arg0: Integral[A], F: MonadGen[M]): M[A]

    Generates a random integral number in the given [inclusive,inclusive] range.

    Generates a random integral number in the given [inclusive,inclusive] range.

    When the generator tries to shrink, it will shrink towards the Range.origin of the specified Range.

    For example, the following generator will produce a number between 1970 and 2100, but will shrink towards 2000:

    Gen.integral(Range.constantFrom(2000, 1970, 2100))

    Some sample outputs from this generator might look like:

    === Outcome ===
    1973
    === Shrinks ===
    2000
    1987
    1980
    1976
    1974
    
    === Outcome ===
    2061
    === Shrinks ===
    2000
    2031
    2046
    2054
    2058
    2060
  16. def integral_[A](range: Range[A], fromLong: (Long) => A)(implicit G: MonadGen[M], I: Integral[A]): M[A]

    Generates a random integral number in the [inclusive,inclusive] range.

    Generates a random integral number in the [inclusive,inclusive] range.

    This generator does not shrink.

  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def list[A](gen: M[A], range: Range[Int])(implicit F: Monad[M], G: MonadGen[M]): M[List[A]]

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

  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def sized[A](f: (Size) => M[A])(implicit F: Monad[M], G: MonadGen[M]): M[A]

    Construct a generator that depends on the size parameter.

  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped