/** Returns the next random int. */ public static int nextInt(int n) { Random random = getRandom(); int value = random.nextInt(n); if (!_isTest) _freeRandomList.free(random); return value; }
/** Returns the next random double between 0 and 1 */ public static double nextDouble() { Random random = getRandom(); double value = random.nextDouble(); if (!_isTest) _freeRandomList.free(random); return value; }
/** Returns the next random long. */ public static long getRandomLong() { Random random = getRandom(); long value = random.nextLong(); if (!_isTest) _freeRandomList.free(random); return value; }