Interface RandomSource

All Known Subinterfaces:
BitRandomSource
All Known Implementing Classes:
LegacyRandomSource, RandomSequences.DirtyMarkingRandomSource, SingleThreadedRandomSource, ThreadSafeLegacyRandomSource, WorldgenRandom, XoroshiroRandomSource

public interface RandomSource
  • Field Details

  • Method Details

    • create

      static RandomSource create()
    • createThreadSafe

      @Deprecated static RandomSource createThreadSafe()
      Deprecated.
    • create

      static RandomSource create(long seed)
    • createThreadLocalInstance

      static RandomSource createThreadLocalInstance()
    • createThreadLocalInstance

      static RandomSource createThreadLocalInstance(long seed)
    • fork

      RandomSource fork()
    • forkPositional

      PositionalRandomFactory forkPositional()
    • setSeed

      void setSeed(long seed)
    • nextInt

      int nextInt()
    • nextInt

      int nextInt(int bound)
    • nextIntBetweenInclusive

      default int nextIntBetweenInclusive(int min, int maxInclusive)
    • nextLong

      long nextLong()
    • nextBoolean

      boolean nextBoolean()
    • nextFloat

      float nextFloat()
    • nextDouble

      double nextDouble()
    • nextGaussian

      double nextGaussian()
    • triangle

      default double triangle(double mean, double spread)
    • triangle

      default float triangle(float mean, float spread)
    • consumeCount

      default void consumeCount(int rounds)
    • nextInt

      default int nextInt(int origin, int bound)