Packages

  • package root
    Definition Classes
    root
  • package zio
    Definition Classes
    root
  • package blocking
    Definition Classes
    zio
  • package clock
    Definition Classes
    zio
  • package console
    Definition Classes
    zio
  • package duration
    Definition Classes
    zio
  • package internal
    Definition Classes
    zio
  • package random
    Definition Classes
    zio
  • Random
  • package stm
    Definition Classes
    zio
  • package stream
    Definition Classes
    zio
  • package system
    Definition Classes
    zio
  • package test

    _ZIO Test_ is a featherweight testing library for effectful programs.

    _ZIO Test_ is a featherweight testing library for effectful programs.

    The library imagines every spec as an ordinary immutable value, providing tremendous potential for composition. Thanks to tight integration with ZIO, specs can use resources (including those requiring disposal), have well- defined linear and parallel semantics, and can benefit from a host of ZIO combinators.

    import zio.test._
    import zio.test.environment.Live
    import zio.clock.nanoTime
    import Assertion.isGreaterThan
    
    object MyTest extends DefaultRunnableSpec {
      def spec = suite("clock")(
        testM("time is non-zero") {
          assertM(Live.live(nanoTime))(isGreaterThan(0))
        }
      )
    }
    Definition Classes
    zio
p

zio

random

package random

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. random
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. type Random = Has[Service]

Value Members

  1. val nextBoolean: URIO[Random, Boolean]

    generates a pseudo-random boolean.

  2. def nextBytes(length: => Int): ZIO[Random, Nothing, Chunk[Byte]]

    Generates a pseudo-random chunk of bytes of the specified length.

  3. val nextDouble: URIO[Random, Double]

    Generates a pseudo-random, uniformly distributed double between 0.0 and 1.0.

  4. def nextDoubleBetween(minInclusive: Double, maxExclusive: Double): URIO[Random, Double]

    Generates a pseudo-random double in the specified range.

  5. val nextFloat: URIO[Random, Float]

    Generates a pseudo-random, uniformly distributed float between 0.0 and 1.0.

  6. def nextFloatBetween(minInclusive: Float, maxExclusive: Float): URIO[Random, Float]

    Generates a pseudo-random float in the specified range.

  7. val nextGaussian: URIO[Random, Double]

    Generates a pseudo-random double from a normal distribution with mean 0.0 and standard deviation 1.0.

  8. val nextInt: URIO[Random, Int]

    Generates a pseudo-random integer.

  9. def nextIntBetween(minInclusive: Int, maxExclusive: Int): URIO[Random, Int]

    Generates a pseudo-random integer in the specified range.

  10. def nextIntBounded(n: => Int): URIO[Random, Int]

    Generates a pseudo-random integer between 0 (inclusive) and the specified value (exclusive).

  11. val nextLong: URIO[Random, Long]

    Generates a pseudo-random long.

  12. def nextLongBetween(minInclusive: Long, maxExclusive: Long): URIO[Random, Long]

    Generates a pseudo-random long in the specified range.

  13. def nextLongBounded(n: => Long): URIO[Random, Long]

    Generates a pseudo-random long between 0 (inclusive) and the specified value (exclusive).

  14. val nextPrintableChar: URIO[Random, Char]

    Generates a pseudo-random character from the ASCII range 33-126.

  15. def nextString(length: => Int): URIO[Random, String]

    Generates a pseudo-random string of the specified length.

  16. val nextUUID: URIO[Random, UUID]

    Generates psuedo-random universally unique identifiers.

  17. def setSeed(seed: Long): URIO[Random, Unit]

    Sets the seed of this random number generator.

  18. def shuffle[A](list: => List[A]): ZIO[Random, Nothing, List[A]]

    Randomly shuffles the specified list.

  19. object Random extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped