@Test public void testNextDoubleWithMinMax() { double min = 0.8; double max = 0.9; for (int i = 0; i < 1_000_000; i++) { double r = Randomness.nextDouble(min, max); assertTrue( "random double (" + r + ") value has to be in the range [" + min + ", " + max + "]", (Double.compare(r, min) >= 0) && (Double.compare(r, max) <= 0)); } }
public static double nextDouble() { return random.nextDouble(); }
Randomness implements Serializable { public static double nextDouble() { return random.nextDouble(); } }
Randomness implements Serializable { public static double nextDouble() { return random.nextDouble(); } private  Randomness(); }
Randomness implements Serializable { public static double nextDouble() { return random.nextDouble(); } private  Randomness(); static Randomness getInstance(); static boolean nextBoolean(); static int nextInt(int max); static double nextGaussian(); static int nextInt(int min, int max); static int nextInt(); static char nextChar(); static short nextShort(); static long nextLong(); static byte nextByte(); static double nextDouble(); static double nextDouble(double min, double max); static float nextFloat(); static void setSeed(long seed); static long getSeed(); static T choice(List<T> list); @SuppressWarnings("unchecked") static T choice(Collection<T> set); static T choice(T... elements); static void shuffle(List<?> list); static String nextString(int length); }
Randomness implements Serializable { public static double nextDouble() { return random.nextDouble(); } private  Randomness(); static Randomness getInstance(); static boolean nextBoolean(); static int nextInt(int max); static double nextGaussian(); static int nextInt(int min, int max); static int nextInt(); static char nextChar(); static short nextShort(); static long nextLong(); static byte nextByte(); static double nextDouble(); static double nextDouble(double min, double max); static float nextFloat(); static void setSeed(long seed); static long getSeed(); static T choice(List<T> list); @SuppressWarnings("unchecked") static T choice(Collection<T> set); static T choice(T... elements); static void shuffle(List<?> list); static String nextString(int length);  }