trait RandomObj[T <: Exec[T]] extends Random[T] with Mutable[T]
A transactional pseudo-random number generator which
behaves numerically like java.util.Random
.
- Alphabetic
- By Inheritance
- RandomObj
- Mutable
- Disposable
- Writable
- Identified
- Random
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def copy[Out <: Exec[Out]]()(implicit tx: T, txOut: Out): RandomObj[Out]
- abstract def dispose()(implicit tx: T): Unit
- Definition Classes
- Disposable
- abstract def id: Ident[T]
- Definition Classes
- Identified
- abstract def nextBoolean()(implicit tx: T): Boolean
Generates a random
Boolean
value.Generates a random
Boolean
value.- Definition Classes
- Random
- abstract def nextDouble()(implicit tx: T): Double
Generates a random
Double
value, uniformly distributed between0.0
(inclusive) and1.0
(exclusive).Generates a random
Double
value, uniformly distributed between0.0
(inclusive) and1.0
(exclusive).- Definition Classes
- Random
- abstract def nextFloat()(implicit tx: T): Float
Generates a random
Float
value, uniformly distributed between0.0f
(inclusive) and1.0f
(exclusive).Generates a random
Float
value, uniformly distributed between0.0f
(inclusive) and1.0f
(exclusive).- Definition Classes
- Random
- abstract def nextInt(n: Int)(implicit tx: T): Int
Generates a random
Int
value in the range of 0 (inclusive) until the specified valuen
(exclusive).Generates a random
Int
value in the range of 0 (inclusive) until the specified valuen
(exclusive).- Definition Classes
- Random
- abstract def nextInt()(implicit tx: T): Int
Generates a random
Int
value in the rangeInt.MinValue
toInt.MaxValue
.Generates a random
Int
value in the rangeInt.MinValue
toInt.MaxValue
.- Definition Classes
- Random
- abstract def nextLong()(implicit tx: T): Long
Generates a random
Long
value in the rangeLong.MinValue
toLong.MaxValue
.Generates a random
Long
value in the rangeLong.MinValue
toLong.MaxValue
.WARNING: Because it uses the same algorithm as
java.util.Random
, with a seed of only 48 bits, this function will not return all possible long values!- Definition Classes
- Random
- abstract def rawSeed(implicit tx: T): Long
- Definition Classes
- Random
- abstract def rawSeed_=(seed: Long)(implicit tx: T): Unit
Resets the internal seed value to the given argument.
Resets the internal seed value to the given argument. This is a raw seed value as obtained from
getRawSeed
. For user operation, usesetSeed
instead, which further scrambles the seed value.- Definition Classes
- Random
- abstract def setSeed(seed: Long)(implicit tx: T): Unit
Resets the internal seed value to the given argument.
Resets the internal seed value to the given argument.
- Definition Classes
- Random
- abstract def write(out: DataOutput): Unit
- Definition Classes
- Writable
Concrete 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: Any): Boolean
- Definition Classes
- Identified → AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- Identified → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated