Class ProviderBuilder

java.lang.Object
org.apache.commons.rng.simple.internal.ProviderBuilder

public final class ProviderBuilder
extends java.lang.Object
RNG builder.

It uses reflection to find the factory method of the RNG implementation, and performs seed type conversions.

  • Method Details

    • create

      public static RestorableUniformRandomProvider create​(ProviderBuilder.RandomSourceInternal source, java.lang.Object seed, java.lang.Object[] args)
      Creates a RNG instance.
      Parameters:
      source - RNG specification.
      seed - Seed value. It can be null (in which case a random value will be used).
      args - Additional arguments to the implementation's constructor.
      Returns:
      a new RNG instance.
      Throws:
      java.lang.UnsupportedOperationException - if the seed type is invalid.