Class RandomUtils
- java.lang.Object
-
- org.optaplanner.core.impl.solver.random.RandomUtils
-
public class RandomUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
nextDouble(Random random, double n)
MimicsRandom.nextInt(int)
for doubles.static long
nextLong(Random random, long n)
MimicsRandom.nextInt(int)
for longs.
-
-
-
Method Detail
-
nextLong
public static long nextLong(Random random, long n)
MimicsRandom.nextInt(int)
for longs.- Parameters:
random
- never nulln
-> 0L
- Returns:
- like
Random.nextInt(int)
but for a long - See Also:
Random.nextInt(int)
-
nextDouble
public static double nextDouble(Random random, double n)
MimicsRandom.nextInt(int)
for doubles.- Parameters:
random
- never nulln
-> 0.0
- Returns:
- like
Random.nextInt(int)
but for a double - See Also:
Random.nextInt(int)
-
-