object Random extends Serializable
- Alphabetic
- By Inheritance
- Random
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- final case class RandomScala(random: scala.util.Random) extends Random with Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val RandomLive: Random
- val any: ZLayer[Random, Nothing, Random]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val live: Layer[Nothing, Random]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
nextBoolean(implicit trace: ZTraceElement): URIO[Random, Boolean]
generates a pseudo-random boolean.
-
def
nextBytes(length: ⇒ Int)(implicit trace: ZTraceElement): ZIO[Random, Nothing, Chunk[Byte]]
Generates a pseudo-random chunk of bytes of the specified length.
-
def
nextDouble(implicit trace: ZTraceElement): URIO[Random, Double]
Generates a pseudo-random, uniformly distributed double between 0.0 and 1.0.
-
def
nextDoubleBetween(minInclusive: ⇒ Double, maxExclusive: ⇒ Double)(implicit trace: ZTraceElement): URIO[Random, Double]
Generates a pseudo-random double in the specified range.
-
def
nextFloat(implicit trace: ZTraceElement): URIO[Random, Float]
Generates a pseudo-random, uniformly distributed float between 0.0 and 1.0.
-
def
nextFloatBetween(minInclusive: ⇒ Float, maxExclusive: ⇒ Float)(implicit trace: ZTraceElement): URIO[Random, Float]
Generates a pseudo-random float in the specified range.
-
def
nextGaussian(implicit trace: ZTraceElement): URIO[Random, Double]
Generates a pseudo-random double from a normal distribution with mean 0.0 and standard deviation 1.0.
-
def
nextInt(implicit trace: ZTraceElement): URIO[Random, Int]
Generates a pseudo-random integer.
-
def
nextIntBetween(minInclusive: ⇒ Int, maxExclusive: ⇒ Int)(implicit trace: ZTraceElement): URIO[Random, Int]
Generates a pseudo-random integer in the specified range.
-
def
nextIntBounded(n: ⇒ Int)(implicit trace: ZTraceElement): URIO[Random, Int]
Generates a pseudo-random integer between 0 (inclusive) and the specified value (exclusive).
-
def
nextLong(implicit trace: ZTraceElement): URIO[Random, Long]
Generates a pseudo-random long.
-
def
nextLongBetween(minInclusive: ⇒ Long, maxExclusive: ⇒ Long)(implicit trace: ZTraceElement): URIO[Random, Long]
Generates a pseudo-random long in the specified range.
-
def
nextLongBounded(n: ⇒ Long)(implicit trace: ZTraceElement): URIO[Random, Long]
Generates a pseudo-random long between 0 (inclusive) and the specified value (exclusive).
-
def
nextPrintableChar(implicit trace: ZTraceElement): URIO[Random, Char]
Generates a pseudo-random character from the ASCII range 33-126.
-
def
nextString(length: ⇒ Int)(implicit trace: ZTraceElement): URIO[Random, String]
Generates a pseudo-random string of the specified length.
-
def
nextUUID(implicit trace: ZTraceElement): URIO[Random, UUID]
Generates psuedo-random universally unique identifiers.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
scalaRandom: ZLayer[scala.util.Random, Nothing, Random]
Constructs a
Random
service from ascala.util.Random
. -
def
setSeed(seed: ⇒ Long)(implicit trace: ZTraceElement): URIO[Random, Unit]
Sets the seed of this random number generator.
-
def
shuffle[A](list: ⇒ List[A])(implicit trace: ZTraceElement): ZIO[Random, Nothing, List[A]]
Randomly shuffles the specified list.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()