Class RandomPicks
java.lang.Object
com.carrotsearch.randomizedtesting.generators.RandomPicks
Random selections of objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcheckZeroLength(int length) static byterandomFrom(Random r, byte[] array) static charrandomFrom(Random r, char[] array) static doublerandomFrom(Random r, double[] array) static floatrandomFrom(Random r, float[] array) static intrandomFrom(Random r, int[] array) static longrandomFrom(Random r, long[] array) static shortrandomFrom(Random r, short[] array) static <T> TrandomFrom(Random r, Collection<T> collection) Pick a random object from the collection.static <T> TrandomFrom(Random r, List<T> list) Pick a random object from the given list.static <T> TrandomFrom(Random r, T[] array) Pick a random object from the given array.
-
Constructor Details
-
RandomPicks
public RandomPicks()
-
-
Method Details
-
randomFrom
-
randomFrom
-
randomFrom
-
randomFrom
-
randomFrom
-
randomFrom
-
randomFrom
-
checkZeroLength
private static void checkZeroLength(int length) -
randomFrom
Pick a random object from the given array. -
randomFrom
-
randomFrom
Pick a random object from the collection. Requires linear scanning.
-