Package org.redisson.misc
Class RandomXoshiro256PlusPlus
java.lang.Object
java.util.Random
org.redisson.misc.RandomXoshiro256PlusPlus
- All Implemented Interfaces:
Serializable,java.util.random.RandomGenerator
Implementation of Random based on the xoshiro256** RNG. No-dependencies
Java port of the original C code,
which is public domain. This Java port is similarly dedicated to the public
domain.
This implementation is thread-safe.
- Author:
- David Blackman and Sebastiano Vigna <vigna@acm.org> (original C code), Una Thompson <una@unascribed.com> (Java port), Nikita Koksharov
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.random.RandomGenerator
java.util.random.RandomGenerator.ArbitrarilyJumpableGenerator, java.util.random.RandomGenerator.JumpableGenerator, java.util.random.RandomGenerator.LeapableGenerator, java.util.random.RandomGenerator.SplittableGenerator, java.util.random.RandomGenerator.StreamableGenerator -
Method Summary
Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, from, ints, ints, ints, ints, longs, longs, longs, longs, nextGaussianMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.random.RandomGenerator
isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextInt, nextLong
-
Method Details
-
create
-
setSeed
public void setSeed(long seed) -
next
protected int next(int bits) -
nextInt
public int nextInt() -
nextInt
public int nextInt(int bound) -
nextLong
public long nextLong(long bound) -
nextDouble
public double nextDouble()- Specified by:
nextDoublein interfacejava.util.random.RandomGenerator- Overrides:
nextDoublein classRandom
-
nextFloat
public float nextFloat() -
nextBoolean
public boolean nextBoolean()- Specified by:
nextBooleanin interfacejava.util.random.RandomGenerator- Overrides:
nextBooleanin classRandom
-
nextBytes
public void nextBytes(byte[] buf) -
nextBytes
public void nextBytes(byte[] buf, int ofs, int len) -
nextLong
public long nextLong()
-