java.lang.Object
java.util.Random
io.jenetics.util.RandomAdapter
- All Implemented Interfaces:
Serializable
,RandomGenerator
Deprecated, for removal: This API element is subject to removal in a future version.
Some places in the Java API still require a
Random
object instead of
the new RandomGenerator
. This class can be used by using this adapter
class.
final var random = RandomGenerator.getDefault();
final var bi = new BigInteger(100, RandomAdapter.of(random));
- Since:
- 7.0
- Version:
- 7.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.random.RandomGenerator
RandomGenerator.ArbitrarilyJumpableGenerator, RandomGenerator.JumpableGenerator, RandomGenerator.LeapableGenerator, RandomGenerator.SplittableGenerator, RandomGenerator.StreamableGenerator
-
Method Summary
Modifier and TypeMethodDescriptiondoubles()
Deprecated, for removal: This API element is subject to removal in a future version.doubles
(double randomNumberOrigin, double randomNumberBound) Deprecated, for removal: This API element is subject to removal in a future version.doubles
(long streamSize) Deprecated, for removal: This API element is subject to removal in a future version.doubles
(long streamSize, double randomNumberOrigin, double randomNumberBound) Deprecated, for removal: This API element is subject to removal in a future version.ints()
Deprecated, for removal: This API element is subject to removal in a future version.ints
(int randomNumberOrigin, int randomNumberBound) Deprecated, for removal: This API element is subject to removal in a future version.ints
(long streamSize) Deprecated, for removal: This API element is subject to removal in a future version.ints
(long streamSize, int randomNumberOrigin, int randomNumberBound) Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.longs()
Deprecated, for removal: This API element is subject to removal in a future version.longs
(long streamSize) Deprecated, for removal: This API element is subject to removal in a future version.longs
(long randomNumberOrigin, long randomNumberBound) Deprecated, for removal: This API element is subject to removal in a future version.longs
(long streamSize, long randomNumberOrigin, long randomNumberBound) Deprecated, for removal: This API element is subject to removal in a future version.boolean
Deprecated, for removal: This API element is subject to removal in a future version.void
nextBytes
(byte[] bytes) Deprecated, for removal: This API element is subject to removal in a future version.double
Deprecated, for removal: This API element is subject to removal in a future version.double
nextDouble
(double bound) Deprecated, for removal: This API element is subject to removal in a future version.double
nextDouble
(double origin, double bound) Deprecated, for removal: This API element is subject to removal in a future version.double
Deprecated, for removal: This API element is subject to removal in a future version.float
Deprecated, for removal: This API element is subject to removal in a future version.float
nextFloat
(float bound) Deprecated, for removal: This API element is subject to removal in a future version.float
nextFloat
(float origin, float bound) Deprecated, for removal: This API element is subject to removal in a future version.double
Deprecated, for removal: This API element is subject to removal in a future version.double
nextGaussian
(double mean, double stddev) Deprecated, for removal: This API element is subject to removal in a future version.int
nextInt()
Deprecated, for removal: This API element is subject to removal in a future version.int
nextInt
(int bound) Deprecated, for removal: This API element is subject to removal in a future version.int
nextInt
(int origin, int bound) Deprecated, for removal: This API element is subject to removal in a future version.long
nextLong()
Deprecated, for removal: This API element is subject to removal in a future version.long
nextLong
(long bound) Deprecated, for removal: This API element is subject to removal in a future version.long
nextLong
(long origin, long bound) Deprecated, for removal: This API element is subject to removal in a future version.static Random
of
(RandomGenerator random) Deprecated, for removal: This API element is subject to removal in a future version.Create a newRandom
object from the givenrandom
generator.
-
Method Details
-
isDeprecated
Deprecated, for removal: This API element is subject to removal in a future version. -
doubles
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
doubles
in interfaceRandomGenerator
- Overrides:
doubles
in classRandom
-
doubles
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
doubles
in interfaceRandomGenerator
- Overrides:
doubles
in classRandom
-
doubles
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
doubles
in interfaceRandomGenerator
- Overrides:
doubles
in classRandom
-
doubles
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
doubles
in interfaceRandomGenerator
- Overrides:
doubles
in classRandom
-
ints
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
ints
in interfaceRandomGenerator
- Overrides:
ints
in classRandom
-
ints
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
ints
in interfaceRandomGenerator
- Overrides:
ints
in classRandom
-
ints
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
ints
in interfaceRandomGenerator
- Overrides:
ints
in classRandom
-
ints
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
ints
in interfaceRandomGenerator
- Overrides:
ints
in classRandom
-
longs
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
longs
in interfaceRandomGenerator
- Overrides:
longs
in classRandom
-
longs
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
longs
in interfaceRandomGenerator
- Overrides:
longs
in classRandom
-
longs
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
longs
in interfaceRandomGenerator
- Overrides:
longs
in classRandom
-
longs
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
longs
in interfaceRandomGenerator
- Overrides:
longs
in classRandom
-
nextBoolean
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
nextBoolean
in interfaceRandomGenerator
- Overrides:
nextBoolean
in classRandom
-
nextBytes
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
nextBytes
in interfaceRandomGenerator
- Overrides:
nextBytes
in classRandom
-
nextFloat
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
nextFloat
in interfaceRandomGenerator
- Overrides:
nextFloat
in classRandom
-
nextFloat
Deprecated, for removal: This API element is subject to removal in a future version. -
nextFloat
Deprecated, for removal: This API element is subject to removal in a future version. -
nextDouble
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
nextDouble
in interfaceRandomGenerator
- Overrides:
nextDouble
in classRandom
-
nextDouble
Deprecated, for removal: This API element is subject to removal in a future version. -
nextDouble
Deprecated, for removal: This API element is subject to removal in a future version. -
nextInt
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
nextInt
in interfaceRandomGenerator
- Overrides:
nextInt
in classRandom
-
nextInt
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
nextInt
in interfaceRandomGenerator
- Overrides:
nextInt
in classRandom
-
nextInt
Deprecated, for removal: This API element is subject to removal in a future version. -
nextLong
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
nextLong
in interfaceRandomGenerator
- Overrides:
nextLong
in classRandom
-
nextLong
Deprecated, for removal: This API element is subject to removal in a future version. -
nextLong
Deprecated, for removal: This API element is subject to removal in a future version. -
nextGaussian
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
nextGaussian
in interfaceRandomGenerator
- Overrides:
nextGaussian
in classRandom
-
nextGaussian
Deprecated, for removal: This API element is subject to removal in a future version. -
nextExponential
Deprecated, for removal: This API element is subject to removal in a future version. -
of
Deprecated, for removal: This API element is subject to removal in a future version.Create a newRandom
object from the givenrandom
generator.- Parameters:
random
- the random generator to adapt- Returns:
- the adapted random generator
-
Random.from(RandomGenerator)
method instead.