protected static final class AbstRandomBasedFactory.SafeRandom extends Object implements AbstRandomBasedFactory.IRandom
| Constructor and Description |
|---|
SafeRandom()
Default constructor.
|
SafeRandom(IntFunction<byte[]> randomFunction)
Constructor with a function which returns random numbers.
|
SafeRandom(Random random)
Constructor with a random.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
nextBytes(int length)
Return a random array of bytes.
|
long |
nextLong()
Return a random number.
|
public SafeRandom()
public SafeRandom(Random random)
random - a randompublic SafeRandom(IntFunction<byte[]> randomFunction)
randomFunction - a functionpublic long nextLong()
AbstRandomBasedFactory.IRandomnextLong in interface AbstRandomBasedFactory.IRandompublic byte[] nextBytes(int length)
AbstRandomBasedFactory.IRandomnextBytes in interface AbstRandomBasedFactory.IRandomlength - the lengthCopyright © 2024. All rights reserved.