Interface RndInt31

All Known Implementing Classes:
LcgRndInt31, RndAdapter

public interface RndInt31
31bit Random number generator.

INFO : java.util.random.RandomGenerator#nextInt(int bound) added since JDK17 or later.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Return next random number as 31bit int from LSB without sign-bit.
  • Method Details

    • nextInt31

      int nextInt31()
      Return next random number as 31bit int from LSB without sign-bit.

      Only positive or zero value returned.

      * LCG implementations on CPU without 64-bit remainders often output only 31-bit random numbers.

      Returns:
      random number