Package org.spongepowered.api.util
Interface RandomProvider.Source
- All Superinterfaces:
RandomGenerator
- Enclosing interface:
- RandomProvider
A source of randomness.
-
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
Methods inherited from interface java.util.random.RandomGenerator
doubles, doubles, doubles, doubles, ints, ints, ints, ints, isDeprecated, longs, longs, longs, longs, nextBoolean, nextBytes, nextDouble, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextFloat, nextGaussian, nextGaussian, nextInt, nextInt, nextInt, nextLong, nextLong, nextLong
-
Method Details
-
setSeed
void setSeed(long seed) Sets the seed for this random source- Parameters:
seed
- The seed
-
fork
RandomProvider.Source fork()Returns a forked random source.- Returns:
- The forked random source
-
consume
void consume(int n) Skips the next n randomly generated numbers.- Parameters:
n
- The number of generated numbers to skip
-