Package nlScript.util
Class RandomInt
java.lang.Object
nlScript.util.RandomInt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic intnext(int from, int to) Generates an integral number in the interval [from; to] (both inclusive)static <T> ArrayList<T> nextRandomDistinctEntries(ArrayList<T> collection, int n) static <T> voidnextRandomDistinctEntries(T[] collection, int n, T[] ret) static int[]nextRandomDistinctValues(int from, int to, int n)
-
Constructor Details
-
RandomInt
public RandomInt()
-
-
Method Details
-
next
public static int next(int from, int to) Generates an integral number in the interval [from; to] (both inclusive)- Parameters:
from-to-- Returns:
-
nextRandomDistinctValues
public static int[] nextRandomDistinctValues(int from, int to, int n) -
nextRandomDistinctEntries
public static <T> void nextRandomDistinctEntries(T[] collection, int n, T[] ret) -
nextRandomDistinctEntries
-
main
-