Package org.apache.jena.atlas.test
Class Gen
- java.lang.Object
-
- org.apache.jena.atlas.test.Gen
-
public class Gen extends java.lang.Object
Support for testing. May be generally useful
-
-
Constructor Summary
Constructors Constructor Description Gen()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int[]
permute(int[] x)
Pull items out of the list in a random orderstatic int[]
rand(int numRand, int low, int high)
Generate a random sequence between low (inclusive) and high (exclusive): may include duplicates.static int[]
rand(int numRand, int low, int high, boolean allDifferent)
Generate a random sequence between low (inclusive) and high (exclusive) - with duplicates or notstatic int[]
shuffle(int[] x, int num)
Do a number of random pair-wise swapsstatic java.lang.String
strings(int[] keys)
-
-
-
Method Detail
-
rand
public static int[] rand(int numRand, int low, int high)
Generate a random sequence between low (inclusive) and high (exclusive): may include duplicates.
-
rand
public static int[] rand(int numRand, int low, int high, boolean allDifferent)
Generate a random sequence between low (inclusive) and high (exclusive) - with duplicates or not
-
permute
public static int[] permute(int[] x)
Pull items out of the list in a random order
-
shuffle
public static int[] shuffle(int[] x, int num)
Do a number of random pair-wise swaps
-
strings
public static java.lang.String strings(int[] keys)
-
-