TRandom

zio.stm.TRandom
See theTRandom companion trait
object TRandom extends Serializable

Attributes

Companion
trait
Graph
Supertypes
trait Serializable
class Object
trait Matchable
class Any
Self type
TRandom.type

Members list

Value members

Concrete methods

def nextBytes(length: => Int): URSTM[TRandom, Chunk[Byte]]

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

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

Attributes

def nextDoubleBetween(minInclusive: Double, maxExclusive: Double): URSTM[TRandom, Double]

Generates a pseudo-random double in the specified range inside a transaction.

Generates a pseudo-random double in the specified range inside a transaction.

Attributes

def nextFloatBetween(minInclusive: Float, maxExclusive: Float): URSTM[TRandom, Float]

Generates a pseudo-random float in the specified range inside a transaction.

Generates a pseudo-random float in the specified range inside a transaction.

Attributes

def nextIntBetween(minInclusive: Int, maxExclusive: Int): URSTM[TRandom, Int]

Generates a pseudo-random integer in the specified range inside a transaction.

Generates a pseudo-random integer in the specified range inside a transaction.

Attributes

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

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

Attributes

def nextLongBetween(minInclusive: Long, maxExclusive: Long): URSTM[TRandom, Long]

Generates a pseudo-random long in the specified range inside a transaction.

Generates a pseudo-random long in the specified range inside a transaction.

Attributes

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

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

Attributes

def nextString(length: => Int): URSTM[TRandom, String]

Generates a pseudo-random string of the specified length inside a transaction.

Generates a pseudo-random string of the specified length inside a transaction.

Attributes

def setSeed(seed: Long): URSTM[TRandom, Unit]

Sets the seed of this random number generator inside a transaction.

Sets the seed of this random number generator inside a transaction.

Attributes

def shuffle[A](list: => List[A]): URSTM[TRandom, List[A]]

Randomly shuffles the specified list.

Randomly shuffles the specified list.

Attributes

Concrete fields

val any: ZLayer[TRandom, Nothing, TRandom]
val live: ZLayer[Any, Nothing, TRandom]

Generates a pseudo-random boolean inside a transaction.

Generates a pseudo-random boolean inside a transaction.

Attributes

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

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

Attributes

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

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

Attributes

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

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

Attributes

Generates a pseudo-random integer inside a transaction.

Generates a pseudo-random integer inside a transaction.

Attributes

Generates a pseudo-random long inside a transaction.

Generates a pseudo-random long inside a transaction.

Attributes

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

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

Attributes