Class TRandom

java.lang.Object
org.teavm.classlib.java.lang.TObject
org.teavm.classlib.java.util.TRandom
All Implemented Interfaces:
TSerializable
Direct Known Subclasses:
TThreadLocalRandom

public class TRandom extends TObject implements TSerializable
  • Constructor Details

    • TRandom

      public TRandom()
    • TRandom

      public TRandom(long seed)
  • Method Details

    • setSeed

      public void setSeed(long seed)
    • next

      protected int next(int bits)
    • nextBytes

      public void nextBytes(byte[] bytes)
    • nextInt

      public int nextInt()
    • nextInt

      public int nextInt(int n)
    • nextLong

      public long nextLong()
    • nextBoolean

      public boolean nextBoolean()
    • nextFloat

      public float nextFloat()
    • nextDouble

      public double nextDouble()
    • nextGaussian

      public double nextGaussian()
      Generate a random number with Gaussian distribution: centered around 0 with a standard deviation of 1.0.
    • ints

      public TIntStream ints(long streamSize)
    • ints

      public TIntStream ints()
    • ints

      public TIntStream ints(long streamSize, int randomNumberOrigin, int randomNumberBound)
    • ints

      public TIntStream ints(int randomNumberOrigin, int randomNumberBound)
    • longs

      public TLongStream longs(long streamSize)
    • longs

      public TLongStream longs()
    • longs

      public TLongStream longs(long streamSize, long randomNumberOrigin, long randomNumberBound)
    • longs

      public TLongStream longs(long randomNumberOrigin, long randomNumberBound)
    • doubles

      public TDoubleStream doubles(long streamSize)
    • doubles

      public TDoubleStream doubles()
    • doubles

      public TDoubleStream doubles(long streamSize, double randomNumberOrigin, double randomNumberBound)
    • doubles

      public TDoubleStream doubles(double randomNumberOrigin, double randomNumberBound)