Package com.linkedin.venice.utils
Class RandomGenUtils
- java.lang.Object
-
- com.linkedin.venice.utils.RandomGenUtils
-
public class RandomGenUtils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description RandomGenUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
getRandomBytes(int length)
Generate an array of random bytesstatic float
getRandomFloat()
static int
getRandomIntInRange(int min, int max)
static int
getRandomIntWithin(int limit)
Return a random integer between 0 and limit (exclusive)
-
-
-
Method Detail
-
getRandomBytes
public static byte[] getRandomBytes(int length)
Generate an array of random bytes- Parameters:
length
- length of the byte array to be generated- Returns:
-
getRandomFloat
public static float getRandomFloat()
- Returns:
- a random float
-
getRandomIntWithin
public static int getRandomIntWithin(int limit)
Return a random integer between 0 and limit (exclusive)- Parameters:
limit
- The upper bound for the range of numbers- Returns:
-
getRandomIntInRange
public static int getRandomIntInRange(int min, int max)
- Parameters:
min
- Minimum Valuemax
- Maximum value. max must be greater than min.- Returns:
- Integer between min and max, inclusive.
-
-