object Rand
RNG state transition functions.
- Alphabetic
- By Inheritance
- Rand
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def flatten[A](rand: Rand[Rand[A]]): Rand[A]
Flattens a nested Rand context.
Flattens a nested Rand context.
- A
The data produced by the context.
- rand
The nested context.
- returns
The flattened context.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def next(numBits: Int): Rand[Long]
Gets
numBitsfrom the next Long value produced by the RNG.Gets
numBitsfrom the next Long value produced by the RNG.- numBits
The number of bits to return.
- returns
A Rand producing
numBitsfrom the next value.
- def nextAsciiChar(): Rand[Char]
Gets the next ASCII Char value produced by the RNG.
Gets the next ASCII Char value produced by the RNG.
- returns
A Rand producing the next ASCII Char value.
- def nextAsciiString(length: Int): Rand[String]
Gets a String of ASCII characters produced by the RNG.
Gets a String of ASCII characters produced by the RNG.
- length
The length of the String to generate.
- returns
A Rand producing a String of the given
length.
- def nextBoolean(): Rand[Boolean]
Gets the next Boolean value produced by the RNG.
Gets the next Boolean value produced by the RNG.
- returns
A Rand producing the next Boolean value.
- def nextChar(): Rand[Char]
Gets the next Char value produced by the RNG.
Gets the next Char value produced by the RNG.
- returns
A Rand producing the next Char value.
- def nextDouble(bound: Double = 1.0): Rand[Double]
Gets the next Double value between 0 and
boundproduced by the RNG.Gets the next Double value between 0 and
boundproduced by the RNG.- bound
The maximum limit of the Double value.
- returns
A Rand producing the next Double value.
- def nextIdChar(): Rand[Char]
Gets the next Java identifier Char value produced by the RNG.
Gets the next Java identifier Char value produced by the RNG.
- returns
A Rand producing the next Char value.
- def nextIdString(length: Int): Rand[String]
Gets a String of Java identifier characters produced by the RNG.
Gets a String of Java identifier characters produced by the RNG.
- length
The length of the String to generate.
- returns
A Rand producing a String of the given
length.
- def nextInt(bound: Int = Int.MaxValue): Rand[Int]
Gets the next Int value between 0 and
boundproduced by the RNG.Gets the next Int value between 0 and
boundproduced by the RNG.- bound
The maximum limit of the Int value.
- returns
A Rand producing the next Int value.
- def nextLong(bound: Long = Long.MaxValue): Rand[Long]
Gets the next Long value between 0 and
boundproduced by the RNG.Gets the next Long value between 0 and
boundproduced by the RNG.- bound
The maximum limit of the Long value.
- returns
A Rand producing the next Long value.
- def nextPrintableChar(): Rand[Char]
Gets the next printable Char value produced by the RNG.
Gets the next printable Char value produced by the RNG.
- returns
A Rand producing the next Char value.
- def nextPrintableString(length: Int): Rand[String]
Gets a String of printable characters produced by the RNG.
Gets a String of printable characters produced by the RNG.
- length
The length of the String to generate.
- returns
A Rand producing a String of the given
length.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def pure[A](value: A): Rand[A]
Lift a pure value into the Rand context.
Lift a pure value into the Rand context.
- value
The value to lift.
- returns
A Rand generator that returns the value and given RNG.
- def repeat[A](count: Int)(rand: Rand[A]): Rand[List[A]]
Repeats a Rand
counttimes to generate a List ofcountrandomly generated values.Repeats a Rand
counttimes to generate a List ofcountrandomly generated values.- A
The data produced by the
rand.- count
The number of times to repeat the
rand.- rand
The Rand to repeat.
- returns
A Rand producing a list of
countvalues.
- def sequence[A](listOfRand: List[Rand[A]]): Rand[List[A]]
Sequences a List of Rand's into a Rand producing a List of random values.
Sequences a List of Rand's into a Rand producing a List of random values.
- A
The data produced by the Rand.
- listOfRand
The List of Rand's.
- returns
A Rand producing a List of generated values.
- 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