Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.util/Random

Random

scala.util.Random
See theRandom companion object
classRandom(valself:Random) extendsSerializable

Attributes

Companion
object
Source
Random.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Known subtypes
objectRandom

Members list

Value members

Constructors

defthis(seed:Long)

Creates a new random number generator using a single long seed.

Creates a new random number generator using a single long seed.

Attributes

Source
Random.scala
defthis(seed:Int)

Creates a new random number generator using a single integer seed.

Creates a new random number generator using a single integer seed.

Attributes

Source
Random.scala
defthis()

Creates a new random number generator.

Creates a new random number generator.

Attributes

Source
Random.scala

Concrete methods

Returns a LazyList of pseudorandomly chosen alphanumeric characters, equally chosen from A-Z, a-z, and 0-9.

Returns a LazyList of pseudorandomly chosen alphanumeric characters, equally chosen from A-Z, a-z, and 0-9.

Attributes

Source
Random.scala
defbetween(minInclusive:Double,maxExclusive:Double):Double

Returns the next pseudorandom, uniformly distributed double value between min (inclusive) and max (exclusive) from this random number generator's sequence.

Returns the next pseudorandom, uniformly distributed double value between min (inclusive) and max (exclusive) from this random number generator's sequence.

Attributes

Source
Random.scala
defbetween(minInclusive:Float,maxExclusive:Float):Float

Returns the next pseudorandom, uniformly distributed float value between min (inclusive) and max (exclusive) from this random number generator's sequence.

Returns the next pseudorandom, uniformly distributed float value between min (inclusive) and max (exclusive) from this random number generator's sequence.

Attributes

Source
Random.scala
defbetween(minInclusive:Int,maxExclusive:Int):Int

Returns a pseudorandom, uniformly distributed int value between min (inclusive) and the specified value max (exclusive), drawn from this random number generator's sequence.

Returns a pseudorandom, uniformly distributed int value between min (inclusive) and the specified value max (exclusive), drawn from this random number generator's sequence.

Attributes

Source
Random.scala
defbetween(minInclusive:Long,maxExclusive:Long):Long

Returns a pseudorandom, uniformly distributed long value between min (inclusive) and the specified value max (exclusive), drawn from this random number generator's sequence.

Returns a pseudorandom, uniformly distributed long value between min (inclusive) and the specified value max (exclusive), drawn from this random number generator's sequence.

Attributes

Source
Random.scala

Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.

Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.

Attributes

Source
Random.scala

Generates random bytes and places them into a user-supplied byte array.

Generates random bytes and places them into a user-supplied byte array.

Attributes

Source
Random.scala

Generatesn random bytes and returns them in a new array.

Generatesn random bytes and returns them in a new array.

Attributes

Source
Random.scala

Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.

Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.

Attributes

Source
Random.scala

Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.

Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.

Attributes

Source
Random.scala

Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence.

Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence.

Attributes

Source
Random.scala

Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.

Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.

Attributes

Source
Random.scala

Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.

Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.

Attributes

Source
Random.scala

Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.

Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.

Attributes

Source
Random.scala

Returns a pseudorandom, uniformly distributed long value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.

Returns a pseudorandom, uniformly distributed long value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.

Attributes

Source
Random.scala

Returns the next pseudorandom, uniformly distributed value from the ASCII range 33-126.

Returns the next pseudorandom, uniformly distributed value from the ASCII range 33-126.

Attributes

Source
Random.scala
defnextString(length:Int):String

Returns a pseudorandomly generated String.

Returns a pseudorandomly generated String. This routine does not take any measures to preserve the randomness of the distribution in the face of factors like unicode's variable-length encoding, so please don't use this for anything important. It's primarily intended for generating test data.

Value parameters

length

the desired length of the String

Attributes

Returns

the String

Source
Random.scala
defsetSeed(seed:Long):Unit

Attributes

Source
Random.scala
defshuffle[T,C](xs:IterableOnce[T])(implicitbf:BuildFrom[xs.type,T,C]):C

Returns a new collection of the same type in a randomly chosen order.

Returns a new collection of the same type in a randomly chosen order.

Attributes

Returns

the shuffled collection

Source
Random.scala

Concrete fields

Attributes

Source
Random.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp