trait Random[-Tx] extends AnyRef
A transactional pseudo-random number generator which
behaves numerically like java.util.Random.
- Alphabetic
- By Inheritance
- Random
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
nextBoolean()(implicit tx: Tx): Boolean
Generates a random
Booleanvalue. -
abstract
def
nextDouble()(implicit tx: Tx): Double
Generates a random
Doublevalue, uniformly distributed between0.0(inclusive) and1.0(exclusive). -
abstract
def
nextFloat()(implicit tx: Tx): Float
Generates a random
Floatvalue, uniformly distributed between0.0f(inclusive) and1.0f(exclusive). -
abstract
def
nextInt(n: Int)(implicit tx: Tx): Int
Generates a random
Intvalue in the range of 0 (inclusive) until the specified valuen(exclusive). -
abstract
def
nextInt()(implicit tx: Tx): Int
Generates a random
Intvalue in the rangeInt.MinValuetoInt.MaxValue. -
abstract
def
nextLong()(implicit tx: Tx): Long
Generates a random
Longvalue in the rangeLong.MinValuetoLong.MaxValue.Generates a random
Longvalue in the rangeLong.MinValuetoLong.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! -
abstract
def
setSeed(seed: Long)(implicit tx: Tx): Unit
Resets the internal seed value to the given argument.
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.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
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
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
- @native() @throws( ... )