Module java.base

Interface RandomGenerator.StreamableGenerator

All Superinterfaces:
RandomGenerator
All Known Subinterfaces:
RandomGenerator.ArbitrarilyJumpableGenerator, RandomGenerator.JumpableGenerator, RandomGenerator.LeapableGenerator, RandomGenerator.SplittableGenerator
All Known Implementing Classes:
SplittableRandom
Enclosing interface:
RandomGenerator

public static interface RandomGenerator.StreamableGenerator extends RandomGenerator
The RandomGenerator.StreamableGenerator interface augments the RandomGenerator interface to provide methods that return streams of RandomGenerator objects. Ideally, such a stream of objects would have the property that the behavior of each object is statistically independent of all the others. In practice, one may have to settle for some approximation to this property.

A generator that implements interface RandomGenerator.SplittableGenerator may choose to use its splits() method to implement the rngs() method required by this interface.

A generator that implements interface RandomGenerator.JumpableGenerator may choose to use its jumps() method to implement the rngs() method required by this interface.

A generator that implements interface RandomGenerator.LeapableGenerator may choose to use its leaps() method to implement the rngs() method required by this interface.

Objects that implement RandomGenerator.StreamableGenerator are typically not cryptographically secure. Consider instead using SecureRandom to get a cryptographically secure pseudo-random number generator for use by security-sensitive applications.