public class RandomBase
extends java.util.Random
Modifier | Constructor and Description |
---|---|
protected |
RandomBase() |
protected |
RandomBase(long seed) |
Modifier and Type | Method and Description |
---|---|
java.util.stream.DoubleStream |
doubles() |
java.util.stream.DoubleStream |
doubles(double randomNumberOrigin,
double randomNumberBound) |
java.util.stream.DoubleStream |
doubles(long streamSize) |
java.util.stream.DoubleStream |
doubles(long streamSize,
double randomNumberOrigin,
double randomNumberBound) |
java.util.stream.IntStream |
ints() |
java.util.stream.IntStream |
ints(int randomNumberOrigin,
int randomNumberBound) |
java.util.stream.IntStream |
ints(long streamSize) |
java.util.stream.IntStream |
ints(long streamSize,
int randomNumberOrigin,
int randomNumberBound) |
java.util.stream.LongStream |
longs() |
java.util.stream.LongStream |
longs(long streamSize) |
java.util.stream.LongStream |
longs(long randomNumberOrigin,
long randomNumberBound) |
java.util.stream.LongStream |
longs(long streamSize,
long randomNumberOrigin,
long randomNumberBound) |
long |
nextLong(long n)
Returns a pseudorandom, uniformly distributed value
between 0 (inclusive) and the specified value (exclusive).
|
public long nextLong(long n)
n
- the bound on the random number to be returned. Must be
positive.java.lang.IllegalArgumentException
- if n is not positiveThreadLocalRandom.nextLong(long)
public final java.util.stream.IntStream ints(long streamSize)
ints
in class java.util.Random
public final java.util.stream.IntStream ints()
ints
in class java.util.Random
public final java.util.stream.IntStream ints(long streamSize, int randomNumberOrigin, int randomNumberBound)
ints
in class java.util.Random
public final java.util.stream.IntStream ints(int randomNumberOrigin, int randomNumberBound)
ints
in class java.util.Random
public final java.util.stream.LongStream longs(long streamSize)
longs
in class java.util.Random
public final java.util.stream.LongStream longs()
longs
in class java.util.Random
public final java.util.stream.LongStream longs(long streamSize, long randomNumberOrigin, long randomNumberBound)
longs
in class java.util.Random
public final java.util.stream.LongStream longs(long randomNumberOrigin, long randomNumberBound)
longs
in class java.util.Random
public final java.util.stream.DoubleStream doubles(long streamSize)
doubles
in class java.util.Random
public final java.util.stream.DoubleStream doubles()
doubles
in class java.util.Random
public final java.util.stream.DoubleStream doubles(long streamSize, double randomNumberOrigin, double randomNumberBound)
doubles
in class java.util.Random
public final java.util.stream.DoubleStream doubles(double randomNumberOrigin, double randomNumberBound)
doubles
in class java.util.Random