fm.liveswitch.LockedRandomizer Class Referenceabstract

Thread-safe class providing access to a single fm.liveswitch.LockedRandomizer#Randomizer. More...

Static Public Member Functions

static int next ()
 Returns a nonnegative random number. More...
 
static int next (int maxValue)
 Returns a nonnegative random number less than the specified maximum. More...
 
static int next (int minValue, int maxValue)
 Returns a random number within a specified range. More...
 
static void nextBytes (byte[] buffer)
 Fills the elements of a specified array of bytes with random numbers. More...
 
static double nextDouble ()
 Returns a random number between 0.0 and 1.0. More...
 
static long nextLong ()
 Returns a nonnegative random number. More...
 
static String randomString (int size)
 Generates a random string of a specified size. More...
 

Detailed Description

Thread-safe class providing access to a single fm.liveswitch.LockedRandomizer#Randomizer.

Member Function Documentation

◆ next() [1/3]

static int fm.liveswitch.LockedRandomizer.next ( )
static

Returns a nonnegative random number.

◆ next() [2/3]

static int fm.liveswitch.LockedRandomizer.next ( int  maxValue)
static

Returns a nonnegative random number less than the specified maximum.

Parameters
maxValueThe maximum value (exclusive).

◆ next() [3/3]

static int fm.liveswitch.LockedRandomizer.next ( int  minValue,
int  maxValue 
)
static

Returns a random number within a specified range.

Parameters
minValueThe minimum value (inclusive).
maxValueThe maximum value (exclusive).

◆ nextBytes()

static void fm.liveswitch.LockedRandomizer.nextBytes ( byte[]  buffer)
static

Fills the elements of a specified array of bytes with random numbers.

Parameters
bufferThe array of bytes to fill.

◆ nextDouble()

static double fm.liveswitch.LockedRandomizer.nextDouble ( )
static

Returns a random number between 0.0 and 1.0.

◆ nextLong()

static long fm.liveswitch.LockedRandomizer.nextLong ( )
static

Returns a nonnegative random number.

◆ randomString()

static String fm.liveswitch.LockedRandomizer.randomString ( int  size)
static

Generates a random string of a specified size.

Parameters
sizeThe size of the output string.