Class ArrayGenerator

java.lang.Object
io.deephaven.engine.testutil.v2.sources.ArrayGenerator

public class ArrayGenerator extends Object
  • Constructor Details

    • ArrayGenerator

      public ArrayGenerator()
  • Method Details

    • randomBooleans

      public static byte[] randomBooleans(Random random, int size)
    • randomBoxedBooleans

      public static Boolean[] randomBoxedBooleans(Random random, int size)
    • randomBytes

      public static byte[] randomBytes(Random random, int size)
    • randomChars

      public static char[] randomChars(Random random, int size)
    • randomDoubles

      public static double[] randomDoubles(Random random, int size)
    • randomFloats

      public static float[] randomFloats(Random random, int size)
    • randomInts

      public static int[] randomInts(Random random, int size)
    • randomObjects

      public static Object[] randomObjects(Random random, int size)
    • randomShorts

      public static short[] randomShorts(Random random, int size)
    • randomLongs

      public static long[] randomLongs(Random random, int size)
    • randomValues

      public static Object randomValues(Class objectType, Random random, int size, int spaceSize)
      Parameters:
      objectType - The type of the elements buit into the array
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomBooleans

      public static boolean[] randomBooleans(Random random, int size, int spaceSize)
      Parameters:
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomBytes

      public static byte[] randomBytes(Random random, int size, int spaceSize)
      Parameters:
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomChars

      public static char[] randomChars(Random random, int size, int spaceSize)
      Parameters:
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomInts

      public static int[] randomInts(Random random, int size, int spaceSize)
      Parameters:
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomLongs

      public static long[] randomLongs(Random random, int size, int spaceSize)
      Parameters:
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomShorts

      public static short[] randomShorts(Random random, int size, int spaceSize)
      Parameters:
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomDoubles

      public static double[] randomDoubles(Random random, int size, int spaceSize)
      Parameters:
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomFloats

      public static float[] randomFloats(Random random, int size, int spaceSize)
      Parameters:
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomStrings

      public static String[] randomStrings(Random random, int size, int spaceSize)
      Parameters:
      random - An instance of the random number generator to be used
      size - The number of elements in the result
      spaceSize - The size of the random values domain (the number of distinct possible values that may exist in the result
      Returns:
      An array with random values
    • randomBooleans

      public static boolean[] randomBooleans(Random random, int size, boolean minValue, boolean maxValue)
    • randomBytes

      public static byte[] randomBytes(Random random, int size, byte minValue, byte maxValue)
    • randomChars

      public static char[] randomChars(Random random, int size, char minValue, char maxValue)
    • randomDoubles

      public static double[] randomDoubles(Random random, int size, double minValue, double maxValue)
    • randomFloats

      public static float[] randomFloats(Random random, int size, float minValue, float maxValue)
    • randomInts

      public static int[] randomInts(Random random, int size, int minValue, int maxValue)
    • randomLongs

      public static long[] randomLongs(Random random, int size, long minValue, long maxValue)
    • randomShorts

      public static short[] randomShorts(Random random, int size, short minValue, short maxValue)
    • randomObjects

      public static Object[] randomObjects(Random random, int size, int minValue, int maxValue)
    • indexDataGenerator

      public static long[] indexDataGenerator(Random random, int size, double gapProbability, int maxStep, int maxValue)
    • getAdapter

      public static ArrayGenerator.ArrayAdapter getAdapter(Object array)
    • getChunkAdapter

      public static ArrayGenerator.ChunkAdapter getChunkAdapter(Object chunk)