Class RandomGenUtils

java.lang.Object
com.linkedin.venice.utils.RandomGenUtils

public class RandomGenUtils extends Object
  • Constructor Details

    • RandomGenUtils

      public RandomGenUtils()
  • Method Details

    • 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 Value
      max - Maximum value. max must be greater than min.
      Returns:
      Integer between min and max, inclusive.