Utility class for random values.
More...
|
int | next () |
| Returns a nonnegative random number. More...
|
|
int | next (int maxValue) |
| Returns a nonnegative random number less than the specified maximum. More...
|
|
int | next (int minValue, int maxValue) |
| Returns a random number within a specified range. More...
|
|
void | nextBytes (byte[] buffer) |
| Fills the elements of a specified array of bytes with random numbers. More...
|
|
double | nextDouble () |
| Returns a random number between 0.0 and 1.0. More...
|
|
String | randomString (int size) |
| Generates a random string of a specified size. More...
|
|
Utility class for random values.
◆ next() [1/3]
int fm.liveswitch.Randomizer.next |
( |
| ) |
|
Returns a nonnegative random number.
- Returns
◆ next() [2/3]
int fm.liveswitch.Randomizer.next |
( |
int |
maxValue | ) |
|
Returns a nonnegative random number less than the specified maximum.
- Parameters
-
maxValue | The maximum value (exclusive). |
- Returns
◆ next() [3/3]
int fm.liveswitch.Randomizer.next |
( |
int |
minValue, |
|
|
int |
maxValue |
|
) |
| |
Returns a random number within a specified range.
- Parameters
-
minValue | The minimum value (inclusive). |
maxValue | The maximum value (exclusive). |
- Returns
◆ nextBytes()
void fm.liveswitch.Randomizer.nextBytes |
( |
byte[] |
buffer | ) |
|
Fills the elements of a specified array of bytes with random numbers.
- Parameters
-
buffer | The array of bytes to fill. |
◆ nextDouble()
double fm.liveswitch.Randomizer.nextDouble |
( |
| ) |
|
Returns a random number between 0.0 and 1.0.
- Returns
◆ randomString()
String fm.liveswitch.Randomizer.randomString |
( |
int |
size | ) |
|
Generates a random string of a specified size.
- Parameters
-
size | The size of the output string. |
- Returns