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.
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.
Returns an effectively unlimited stream of objects, each of which implements the RandomGenerator interface. Ideally the generators in the stream will appear to be statistically independent. The new generators are of the same algorithm as this generator.
Implementation Note:
It is permitted to implement this method in a manner equivalent to rngs (Long.MAX_VALUE).
Returns:
a stream of objects that implement the RandomGenerator interface
Returns an effectively unlimited stream of objects, each of which implements the RandomGenerator interface. Ideally the generators in the stream will appear to be statistically independent. The new generators are of the same algorithm as this generator.
Implementation Requirements:
The default implementation calls rngs() and then limits its length to streamSize.
Parameters:
streamSize - the number of generators to generate
Returns:
a stream of objects that implement the RandomGenerator interface