public final class SeedFactory extends java.lang.Object
This class provides methods to generate random seeds (single values
or arrays of values, of int
or long
types) that can
be passed to the methods that create a generator instance
.
Although the seed-generating methods defined in this class will likely
return different values for all calls, there is no guarantee that the
produced seed will result always in a "good" sequence of numbers (even
if the generator initialized with that seed is good).
There is no guarantee that sequences will not overlap.
Modifier and Type | Method | Description |
---|---|---|
static int |
createInt() |
Creates an
int number for use as a seed. |
static int[] |
createIntArray(int n) |
Creates an array of
int numbers for use as a seed. |
static long |
createLong() |
Creates a
long number for use as a seed. |
static long[] |
createLongArray(int n) |
Creates an array of
long numbers for use as a seed. |
public static int createInt()
int
number for use as a seed.public static long createLong()
long
number for use as a seed.public static int[] createIntArray(int n)
int
numbers for use as a seed.n
- Size of the array to create.n
random numbers.public static long[] createLongArray(int n)
long
numbers for use as a seed.n
- Size of the array to create.n
random numbers.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.