@Test public void testRandomLongsBounded() { assertEquals(10, new RandomCompat().longs(0, 100).peek(new LongConsumer() { @Override public void accept(long value) { if (value < 0 || value > 99) fail(); } }).limit(20).skip(10).count()); new RandomCompat().longs(Long.MIN_VALUE, Long.MIN_VALUE + 5).peek(new LongConsumer() { @Override public void accept(long value) { if (value >= Long.MIN_VALUE + 5) fail(); } }).limit(30).count(); new RandomCompat().longs(Long.MAX_VALUE - 5, Long.MAX_VALUE).peek(new LongConsumer() { @Override public void accept(long value) { if (value < Long.MAX_VALUE - 5 || value == Long.MAX_VALUE) fail(); } }).limit(30).distinct().count(); }
@NotNull public LongStream longs(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return LongStream.empty(); } return longs().limit(streamSize); }
RandomCompat { @NotNull public LongStream longs(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return LongStream.empty(); } return longs().limit(streamSize); } }
RandomCompat { @NotNull public LongStream longs(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return LongStream.empty(); } return longs().limit(streamSize); } RandomCompat();  RandomCompat(long seed);  RandomCompat(@NotNull Random random); }
RandomCompat { @NotNull public LongStream longs(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return LongStream.empty(); } return longs().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 LongStream longs(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(); if (streamSize == 0L) { return LongStream.empty(); } return longs().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);  }