zio.random

package zio.random

Type members

Classlikes

object Random extends Serializable

Types

Value members

Concrete methods

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

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

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

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

Generates a pseudo-random double in the specified range.

Generates a pseudo-random double in the specified range.

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

Generates a pseudo-random float in the specified range.

Generates a pseudo-random float in the specified range.

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

Generates a pseudo-random integer in the specified range.

Generates a pseudo-random integer in the specified range.

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

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

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

Generates a pseudo-random long in the specified range.

Generates a pseudo-random long in the specified range.

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

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

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

Generates a pseudo-random string of the specified length.

Generates a pseudo-random string of the specified length.

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

Sets the seed of this random number generator.

Sets the seed of this random number generator.

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

Randomly shuffles the specified list.

Randomly shuffles the specified list.

Concrete fields

generates a pseudo-random boolean.

generates a pseudo-random boolean.

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

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

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

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

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

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

Generates a pseudo-random integer.

Generates a pseudo-random integer.

Generates a pseudo-random long.

Generates a pseudo-random long.

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

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

Generates psuedo-random universally unique identifiers.

Generates psuedo-random universally unique identifiers.