Is it possible to provide a Seed to a ThreadLocalRandom?
/**
* Throws {@code UnsupportedOperationException}. Setting seeds in
* this generator is not supported.
*
* @throws UnsupportedOperationException always
*/
public void setSeed(long seed) {
if (initialized)
throw new UnsupportedOperationException();
rnd = (seed ^ multiplier) & mask;
}
So can we use ThreadLocalRandom using seed or it's not designed for that?
Aucun commentaire:
Enregistrer un commentaire