FMLiveSwitchLockedRandomizer Class Reference

Thread-safe class providing access to a single FMLiveSwitchLockedRandomizerRandomizer. More...

Class Methods

(int) + next
 Returns a nonnegative random number. More...
 
(void) + nextBytesWithBuffer:
 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...
 
(long long) + nextLong
 Returns a nonnegative random number. More...
 
(int) + nextWithMaxValue:
 Returns a nonnegative random number less than the specified maximum. More...
 
(int) + nextWithMinValue:maxValue:
 Returns a random number within a specified range. More...
 
(NSString *) + randomStringWithSize:
 Generates a random string of a specified size. More...
 

Detailed Description

Thread-safe class providing access to a single FMLiveSwitchLockedRandomizerRandomizer.

Method Documentation

◆ next

+ (int) next

Returns a nonnegative random number.

◆ nextBytesWithBuffer:

+ (void) nextBytesWithBuffer: (NSMutableData *)  buffer

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

Parameters
bufferThe array of bytes to fill.

◆ nextDouble

+ (double) nextDouble

Returns a random number between 0.0 and 1.0.

◆ nextLong

+ (long long) nextLong

Returns a nonnegative random number.

◆ nextWithMaxValue:

+ (int) nextWithMaxValue: (int)  maxValue

Returns a nonnegative random number less than the specified maximum.

Parameters
maxValueThe maximum value (exclusive).

◆ nextWithMinValue:maxValue:

+ (int) nextWithMinValue: (int)  minValue
maxValue: (int)  maxValue 

Returns a random number within a specified range.

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

◆ randomStringWithSize:

+ (NSString*) randomStringWithSize: (int)  size

Generates a random string of a specified size.

Parameters
sizeThe size of the output string.