Object/Class

com.salesforce.op.testkit

RandomStream

Related Docs: class RandomStream | package testkit

Permalink

object RandomStream extends Serializable

Random streams factory: bits, longs, doubles etc.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RandomStream
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class CollectionGenerator[T](elements: Seq[T]) extends (Random) ⇒ T with Serializable with Product

    Permalink

    Generator of values from a given collection, by default uniformly distributed - or with the distribution provided

    Generator of values from a given collection, by default uniformly distributed - or with the distribution provided

    T

    type of the values

    elements

    all possible elements this generator can produce

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. def incrementing(init: Long, minDelta: Long, maxDelta: Long): RandomStream[Long]

    Permalink

    An incrementing stream of random longs

    An incrementing stream of random longs

    init

    initial value

    minDelta

    minimum step to the next

    maxDelta

    maximum step to the next; if it is the same as minDelta, values are not random

    returns

    a random stream of longs

  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  14. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. def of[T](elements: Seq[T]): CollectionGenerator[T]

    Permalink

    Builds a collection generator for a given collection

    Builds a collection generator for a given collection

    T

    type of data

    elements

    collection of the values that the generator will produce

    returns

    a collection generator, uniform distribution by default

  17. def ofBitOptions(probabilityOfTrue: Double): RandomStream[Option[Boolean]]

    Permalink

    Random stream of some bits (booleans) The stream should be passed an RNG to produce values

    Random stream of some bits (booleans) The stream should be passed an RNG to produce values

    probabilityOfTrue

    the probability of the boolean being true

    returns

    the random stream of options of booleans with given probability of truths

  18. def ofBits(seed: Long, probabilityOfTrue: Double): InfiniteStream[Boolean]

    Permalink

    Produces a stream of bits (booleans), with the given probability of true values

    Produces a stream of bits (booleans), with the given probability of true values

    seed

    the seed for random numbers generator

    probabilityOfTrue

    probability of value being true

    returns

    the infinite stream of booleans

  19. def ofBits(probabilityOfTrue: Double): RandomStream[Boolean]

    Permalink

    Random stream of bits (booleans) The stream should be passed an RNG to produce values

    Random stream of bits (booleans) The stream should be passed an RNG to produce values

    probabilityOfTrue

    the probability of the boolean being true

    returns

    the random stream of booleans with given probability of truths

  20. def ofLongs(from: Long, to: Long): RandomStream[Long]

    Permalink

    Random stream of longs The stream should be passed an RNG to produce values in a given range

    Random stream of longs The stream should be passed an RNG to produce values in a given range

    from

    minimum value to produce (inclusive)

    to

    maximum value to produce (exclusive)

    returns

    the random stream of longs between from and to

  21. def ofLongs: RandomStream[Long]

    Permalink

    Random stream of longs The stream should be passed an RNG to produce values

    Random stream of longs The stream should be passed an RNG to produce values

    returns

    the random stream of longs

  22. def ofOnesAndZeros(probabilityOfTrue: Double): RandomStream[Double]

    Permalink

    Random stream of 1s and 0s The stream should be passed an RNG to produce values

    Random stream of 1s and 0s The stream should be passed an RNG to produce values

    probabilityOfTrue

    the probability of the boolean being true

    returns

    the random stream of zeros and ones with given probability of ones

  23. def randomBetween(from: Int, to: Int): (Random) ⇒ Int

    Permalink

    a generator of random integers between two given numbers (in

    a generator of random integers between two given numbers (in

    from

    minimum number to produce (inclusive)

    to

    max number to produce (exclusive)

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def trueWithProbability(probabilityOfTrue: Double): (Random) ⇒ Boolean

    Permalink

    Producer of true with a given probability

    Producer of true with a given probability

    probabilityOfTrue

    the probability of true

    returns

    the function that takes a random and returns a boolean

  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped