@MetaInfServices public class SimpleRandomValueGenerator extends Object implements RandomValueGenerator
| Constructor and Description |
|---|
SimpleRandomValueGenerator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
nextBoolean()
Generate a random boolean.
|
byte |
nextByte()
Generate a random byte.
|
byte[] |
nextBytes(int size)
Generate a random array of bytes.
|
double |
nextDouble()
Generate a random double between 0.0d (inclusive) and 1.0d (exclusive).
|
float |
nextFloat()
Generate a random float between 0.0f (inclusive) and 1.0f (exclusive).
|
int |
nextInt()
Generate a random int.
|
int |
nextInt(int bound) |
long |
nextLong()
Generate a random long.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetInstance, getServiceDefinitionpublic byte nextByte()
nextByte in interface RandomValueGeneratorpublic byte[] nextBytes(int size)
throws IllegalArgumentException
nextBytes in interface RandomValueGeneratorsize - The number of bytes to generate and return. This cannot be a negative number.IllegalArgumentException - If the size parameter is deemed illegal. For example, if it is a negative number.public int nextInt()
nextInt in interface RandomValueGeneratorpublic int nextInt(int bound)
nextInt in interface RandomValueGeneratorpublic long nextLong()
nextLong in interface RandomValueGeneratorpublic float nextFloat()
nextFloat in interface RandomValueGeneratorpublic double nextDouble()
nextDouble in interface RandomValueGeneratorpublic boolean nextBoolean()
nextBoolean in interface RandomValueGeneratorCopyright © 2010–2020 meanbean. All rights reserved.