case class Mock(randomState: Ref[Data], bufferState: Ref[Buffer]) extends Service[Any] with Product with Serializable
Adapted from @gzmo work in Scala.js (https://github.com/scala-js/scala-js/pull/780)
- Alphabetic
- By Inheritance
- Mock
- Product
- Equals
- Service
- Service
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
- val bufferState: Ref[Buffer]
-
val
clearBooleans: UIO[Unit]
Clears the buffer of booleans.
-
val
clearBytes: UIO[Unit]
Clears the buffer of bytes.
-
val
clearChars: UIO[Unit]
Clears the buffer of characters.
-
val
clearDoubles: UIO[Unit]
Clears the buffer of doubles.
-
val
clearFloats: UIO[Unit]
Clears the buffer of floats.
-
val
clearInts: UIO[Unit]
Clears the buffer of integers.
-
val
clearLongs: UIO[Unit]
Clears the buffer of longs.
-
val
clearStrings: UIO[Unit]
Clears the buffer of strings.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
feedBooleans(booleans: Boolean*): UIO[Unit]
Feeds the buffer with specified sequence of booleans.
-
def
feedBytes(bytes: Chunk[Byte]*): UIO[Unit]
Feeds the buffer with specified sequence of chunks of bytes.
-
def
feedChars(chars: Char*): UIO[Unit]
Feeds the buffer with specified sequence of characters.
-
def
feedDoubles(doubles: Double*): UIO[Unit]
Feeds the buffer with specified sequence of doubles.
-
def
feedFloats(floats: Float*): UIO[Unit]
Feeds the buffer with specified sequence of floats.
-
def
feedInts(ints: Int*): UIO[Unit]
Feeds the buffer with specified sequence of integers.
-
def
feedLongs(longs: Long*): UIO[Unit]
Feeds the buffer with specified sequence of longs.
-
def
feedStrings(strings: String*): UIO[Unit]
Feeds the buffer with specified sequence of strings.
-
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()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
val
nextBoolean: UIO[Boolean]
Takes a boolean from the buffer if one exists or else generates a pseudo-random boolean.
Takes a boolean from the buffer if one exists or else generates a pseudo-random boolean.
- Definition Classes
- Mock → Service
-
def
nextBytes(length: Int): UIO[Chunk[Byte]]
Takes a chunk of bytes from the buffer if one exists or else generates a pseudo-random chunk of bytes of the specified length.
Takes a chunk of bytes from the buffer if one exists or else generates a pseudo-random chunk of bytes of the specified length.
- Definition Classes
- Mock → Service
-
val
nextDouble: UIO[Double]
Takes a double from the buffer if one exists or else generates a pseudo-random, uniformly distributed double between 0.0 and 1.0.
Takes a double from the buffer if one exists or else generates a pseudo-random, uniformly distributed double between 0.0 and 1.0.
- Definition Classes
- Mock → Service
-
val
nextFloat: UIO[Float]
Takes a float from the buffer if one exists or else generates a pseudo-random, uniformly distributed float between 0.0 and 1.0.
Takes a float from the buffer if one exists or else generates a pseudo-random, uniformly distributed float between 0.0 and 1.0.
- Definition Classes
- Mock → Service
-
val
nextGaussian: UIO[Double]
Takes a double from the buffer if one exists or else generates a pseudo-random double from a normal distribution with mean 0.0 and standard deviation 1.0.
Takes a double from the buffer if one exists or else generates a pseudo-random double from a normal distribution with mean 0.0 and standard deviation 1.0.
- Definition Classes
- Mock → Service
-
def
nextInt(n: Int): UIO[Int]
Takes an integer from the buffer if one exists or else generates a pseudo-random integer between 0 (inclusive) and the specified value (exclusive).
Takes an integer from the buffer if one exists or else generates a pseudo-random integer between 0 (inclusive) and the specified value (exclusive).
- Definition Classes
- Mock → Service
-
val
nextInt: UIO[Int]
Takes an integer from the buffer if one exists or else generates a pseudo-random integer.
Takes an integer from the buffer if one exists or else generates a pseudo-random integer.
- Definition Classes
- Mock → Service
-
def
nextLong(n: Long): UIO[Long]
Takes a long from the buffer if one exists or else generates a pseudo-random long between 0 (inclusive) and the specified value (exclusive).
Takes a long from the buffer if one exists or else generates a pseudo-random long between 0 (inclusive) and the specified value (exclusive).
- Definition Classes
- Mock → Service
-
val
nextLong: UIO[Long]
Takes a long from the buffer if one exists or else generates a pseudo-random long.
Takes a long from the buffer if one exists or else generates a pseudo-random long.
- Definition Classes
- Mock → Service
-
val
nextPrintableChar: UIO[Char]
Takes a character from the buffer if one exists or else generates a pseudo-random character from the ASCII range 33-126.
Takes a character from the buffer if one exists or else generates a pseudo-random character from the ASCII range 33-126.
- Definition Classes
- Mock → Service
-
def
nextString(length: Int): UIO[String]
Takes a string from the buffer if one exists or else generates a pseudo-random string of the specified length.
Takes a string from the buffer if one exists or else generates a pseudo-random string of the specified length.
- Definition Classes
- Mock → Service
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val randomState: Ref[Data]
-
def
setSeed(seed: Long): UIO[Unit]
Sets the seed of this
MockRandomto the specified value. -
def
shuffle[A](list: List[A]): UIO[List[A]]
Randomly shuffles the specified list.
Randomly shuffles the specified list.
- Definition Classes
- Mock → Service
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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()