@Test public void testRandomDoublesBounded() { assertEquals(10, new RandomCompat().doubles(-1.19, -1.119).peek(new DoubleConsumer() { @Override public void accept(double value) { if (value < -1.19 || value > -1.119) fail(); } }).limit(20).skip(10).count()); new RandomCompat().doubles(0.001002003000, 0.001002003001).peek(new DoubleConsumer() { @Override public void accept(double value) { if (value < 0.001002003000 || value > 0.001002003001) fail(); } }).limit(20).count(); new RandomCompat(new Random() { @Override public double nextDouble() { return 1d; } }).doubles(0.1, 0.2).peek(new DoubleConsumer() { @Override public void accept(double value) { if (value < 0.1 || value > 0.2) fail(); } }).limit(10).count(); }
@NotNull public DoubleStream doubles(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return DoubleStream.empty(); } return doubles().limit(streamSize); }
RandomCompat { @NotNull public DoubleStream doubles(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return DoubleStream.empty(); } return doubles().limit(streamSize); } }
RandomCompat { @NotNull public DoubleStream doubles(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return DoubleStream.empty(); } return doubles().limit(streamSize); } RandomCompat();  RandomCompat(long seed);  RandomCompat(@NotNull Random random); }
RandomCompat { @NotNull public DoubleStream doubles(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return DoubleStream.empty(); } return doubles().limit(streamSize); } RandomCompat();  RandomCompat(long seed);  RandomCompat(@NotNull Random random); @NotNull Random getRandom(); @NotNull IntStream ints(long streamSize); @NotNull LongStream longs(long streamSize); @NotNull DoubleStream doubles(long streamSize); @NotNull IntStream ints(); @NotNull LongStream longs(); @NotNull DoubleStream doubles(); @NotNull IntStream ints(long streamSize, final int randomNumberOrigin, final int randomNumberBound); @NotNull LongStream longs(long streamSize,
            final long randomNumberOrigin, final long randomNumberBound); @NotNull DoubleStream doubles(long streamSize,
            final double randomNumberOrigin, final double randomNumberBound); @NotNull IntStream ints(final int randomNumberOrigin, final int randomNumberBound); @NotNull LongStream longs(final long randomNumberOrigin, final long randomNumberBound); @NotNull DoubleStream doubles(final double randomNumberOrigin, final double randomNumberBound); }
RandomCompat { @NotNull public DoubleStream doubles(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return DoubleStream.empty(); } return doubles().limit(streamSize); } RandomCompat();  RandomCompat(long seed);  RandomCompat(@NotNull Random random); @NotNull Random getRandom(); @NotNull IntStream ints(long streamSize); @NotNull LongStream longs(long streamSize); @NotNull DoubleStream doubles(long streamSize); @NotNull IntStream ints(); @NotNull LongStream longs(); @NotNull DoubleStream doubles(); @NotNull IntStream ints(long streamSize, final int randomNumberOrigin, final int randomNumberBound); @NotNull LongStream longs(long streamSize,
            final long randomNumberOrigin, final long randomNumberBound); @NotNull DoubleStream doubles(long streamSize,
            final double randomNumberOrigin, final double randomNumberBound); @NotNull IntStream ints(final int randomNumberOrigin, final int randomNumberBound); @NotNull LongStream longs(final long randomNumberOrigin, final long randomNumberBound); @NotNull DoubleStream doubles(final double randomNumberOrigin, final double randomNumberBound);  }