org.apache.commons.math3.random

## Class JDKRandomGenerator

- java.lang.Object
- - java.util.Random
  - - org.apache.commons.math3.random.JDKRandomGenerator

- All Implemented Interfaces:
    java.io.Serializable, RandomGenerator

      public class JDKRandomGenerator
      extends java.util.Random
      implements RandomGenerator

  Extension of `java.util.Random` to implement `RandomGenerator`.
  Since:
    1.1
  Version:
    $Id: JDKRandomGenerator.java 1416643 2012-12-03 19:37:14Z tn $
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private static long` | `serialVersionUID` Serializable version identifier.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JDKRandomGenerator()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setSeed(int seed)` Sets the seed of the underlying random number generator using an `int` seed.
    `void` | `setSeed(int[] seed)` Sets the seed of the underlying random number generator using an `int` array seed.

    - ### Methods inherited from class java.util.Random

      `next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.commons.math3.random.RandomGenerator

      `nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed`

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      Serializable version identifier.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### JDKRandomGenerator

          public JDKRandomGenerator()

  - ### Method Detail

    - #### setSeed

          public void setSeed(int seed)

      Sets the seed of the underlying random number generator using an `int` seed.

      Sequences of values generated starting with the same seeds should be identical.

      Specified by:
        `setSeed` in interface `RandomGenerator`
      Parameters:
        `seed` - the seed value

    - #### setSeed

          public void setSeed(int[] seed)

      Sets the seed of the underlying random number generator using an `int` array seed.

      Sequences of values generated starting with the same seeds should be identical.

      Specified by:
        `setSeed` in interface `RandomGenerator`
      Parameters:
        `seed` - the seed value

Copyright (c) 2003-2013 Apache Software Foundation