Klasse CustomGenerators.DoubleRandomNumberGenerator

java.lang.Object
ch.framedev.simplejavautils.CustomGenerators.DoubleRandomNumberGenerator
Umschließende Klasse:
CustomGenerators

public static final class CustomGenerators.DoubleRandomNumberGenerator extends Object
A nested class that generates random doubles within a specified range.
  • Konstruktordetails

    • DoubleRandomNumberGenerator

      public DoubleRandomNumberGenerator()
      Initializes a new instance of the DoubleRandomNumberGenerator class.
    • DoubleRandomNumberGenerator

      public DoubleRandomNumberGenerator(double min, double max)
      Initializes a new random number generator that generates random doubles within the specified range.
      Parameter:
      min - the minimum value inclusive
      max - the maximum value inclusive
  • Methodendetails

    • setMin

      Sets the minimum value for the random double generation.
      Parameter:
      min - the minimum value inclusive
      Gibt zurück:
      this instance for method chaining
    • setMax

      Sets the maximum value for the random double generation.
      Parameter:
      max - the maximum value inclusive
      Gibt zurück:
      this instance for method chaining
    • getMin

      public double getMin()
      Gets the minimum value for the random double generation.
      Gibt zurück:
      the minimum value inclusive
    • getMax

      public double getMax()
      Gets the maximum value for the random double generation.
      Gibt zurück:
      the maximum value inclusive
    • nextDouble

      public double nextDouble()
      Generates a random double within the specified range.
      Gibt zurück:
      a random double within the specified range