接口 RandomSource
- 所有已知子接口:
BitRandomSource
- 所有已知实现类:
LegacyRandomSource
,SingleThreadedRandomSource
,ThreadSafeLegacyRandomSource
,WorldgenRandom
,XoroshiroRandomSource
public interface RandomSource
-
字段概要
字段 -
方法概要
修饰符和类型方法说明default void
consumeCount
(int pCount) static RandomSource
create()
static RandomSource
create
(long pSeed) static RandomSource
static RandomSource
已过时。fork()
boolean
double
float
double
int
nextInt()
int
nextInt
(int pBound) default int
nextInt
(int pOrigin, int pBound) default int
nextIntBetweenInclusive
(int pMin, int pMax) long
nextLong()
void
setSeed
(long pSeed) default double
triangle
(double pMin, double pMax)
-
字段详细资料
-
GAUSSIAN_SPREAD_FACTOR
已过时。- 另请参阅:
-
-
方法详细资料
-
create
-
createThreadSafe
已过时。 -
create
-
createNewThreadLocalInstance
-
fork
RandomSource fork() -
forkPositional
PositionalRandomFactory forkPositional() -
setSeed
void setSeed(long pSeed) -
nextInt
int nextInt() -
nextInt
int nextInt(int pBound) -
nextIntBetweenInclusive
default int nextIntBetweenInclusive(int pMin, int pMax) -
nextLong
long nextLong() -
nextBoolean
boolean nextBoolean() -
nextFloat
float nextFloat() -
nextDouble
double nextDouble() -
nextGaussian
double nextGaussian() -
triangle
default double triangle(double pMin, double pMax) -
consumeCount
default void consumeCount(int pCount) -
nextInt
default int nextInt(int pOrigin, int pBound)
-